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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file recohut-0.0.11.tar.gz.

File metadata

  • Download URL: recohut-0.0.11.tar.gz
  • Upload date:
  • Size: 4.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12

File hashes

Hashes for recohut-0.0.11.tar.gz
Algorithm Hash digest
SHA256 67714016c01b084b49391bfcfadcf0ca94fa74180bfb8460d446ea0605bcc4ed
MD5 615ed30855bf1d64ecfa2b2c8e4c59e0
BLAKE2b-256 e11776b5612c08423eadd2ece0e638aa2639ec0ce16bb5eb5fba52d8cc6bd159

See more details on using hashes here.

File details

Details for the file recohut-0.0.11-py3-none-any.whl.

File metadata

  • Download URL: recohut-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 176.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12

File hashes

Hashes for recohut-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 6a00bab799de1ff62f8c9673e5a85cec357af33dbe6aa357daceed99eeae9e57
MD5 3974e2bd0e859d3d049f4d4eb846f4e0
BLAKE2b-256 0941b8eaf1986e203c67053611bd0f23e9930828c054716c5f288069236df798

See more details on using hashes here.

Supported by

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