Skip to main content

A python library for building recommender systems.

Project description

recohut

Contributors Forks Stargazers Issues MIT License


Logo

a python library for building recommender systems.
Explore the docs »

View Demo · Report Bug · Request Feature

About The Project

(back to top)

Built With

(back to top)

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

  • pytorch
    pip install torch
    
  • lightning
    pip install pytorch-lightning
    

Installation

pip install recohut

(back to top)

Usage

# import the required modules
from recohut.datasets.movielens import ML1mDataModule
from recohut.models.nmf import NMF
from recohut.trainers.pl_trainer import pl_trainer

# build the dataset
class Args:
    def __init__(self):
        self.data_dir = '/content/data'
        self.min_rating = 4
        self.num_negative_samples = 99
        self.min_uc = 5
        self.min_sc = 5
        self.val_p = 0.2
        self.test_p = 0.2
        self.num_workers = 2
        self.normalize = False
        self.batch_size = 32
        self.seed = 42
        self.shuffle = True
        self.pin_memory = True
        self.drop_last = False
        self.split_type = 'stratified'

args = Args()

ds = ML1mDataModule(**args.__dict__)
ds.prepare_data()

# build the model
model = NMF(n_items=ds.data.num_items, n_users=ds.data.num_users, embedding_dim=20)

# train and evaluate the matrix factorization model
pl_trainer(model, ds, max_epochs=5)

Check this quick tutorial.

For more examples, please refer to the Documentation and Tutorials.

(back to top)

Roadmap

  • [] RecSys Model Deployment and MLOps features
  • [] RL agents and environment specific to recommender systems
  • [] Visualization utilities and EDA

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Sparsh A.

@sparsh-ai

(back to top)

Acknowledgments

  • nbdev team for providing supporting tools to build this library.
  • colab team for providing running VMs instances for development and testing.

(back to top)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

recohut-0.0.11.tar.gz (4.7 MB view hashes)

Uploaded Source

Built Distribution

recohut-0.0.11-py3-none-any.whl (176.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page