A python library for building recommender systems.
Project description
recohut
a python library for building recommender systems.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
About The Project
Built With
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
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.
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).
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!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE.txt
for more information.
Contact
Sparsh A.
Acknowledgments
- nbdev team for providing supporting tools to build this library.
- colab team for providing running VMs instances for development and testing.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.