Skip to main content

MovieRecEngine is a simple collaborative filtering based library using Pytorch Sequential Neural Network to make prediction of user ratings for an unseen movie based on his/her past interests/ratings provided.

Project description

MovieRecEngine

MovieRecEngine be an abbreviation of Movie Recommendation Engine. This is a simple collaborative filtering based library using Pytorch Sequential Neural Network to make your Movie Recommendation System easy.

This library is in very early-stage currently! So, there might be remarkable changes.

Installation

Use the package manager pip to install MovieRecEngine.

pip install MovieRecEngine

Description

MovieRecEngine uses collaborative filtering to find similarities between users and items simultaneously to provide recommendations. This allows for serendipitous recommendations; that is, collaborative filtering models can recommend an item to user A based on the interests of a similar user B. Furthermore, the embeddings can be learned automatically, without relying on hand-engineering of features.

MovieRecEngine uses pyptorch sequential Neural Networks to train a model that can predict users rating for an unseen movie based on his/her past interests/ratings provided.

MovieRecEngine, uses tez simple pytorch trainer that supports cpu and gpu training.

How to use MovieRecEngine

  • To train a model using MovieRecEngine, define a Dataset that contains columns "userId", "movieId", "ratings". Example Train sample

  • Create a object for Train class in MovieRecEngine library with parameters trainDatasetPath, userLabelEncoderPath, movieLabelEncoderPath, validDatasetSize, trainBatchSize, validBatchSize, device, nEpochs, trainedModelPath, randomState.

  • Train the model by calling train function in Train class.

  • To predict user movie ratings using MovieRecEngine, define a Dataset that contains columns "userId", "movieId", "ratings". Example Predict sample

NOTE: "userId" needs to contain 1 unique userId.

  • Create a object for Predict class in MovieRecEngine library with parameters datasetPath, userLabelEncoderPath, movieLabelEncoderPath, trainedModelPath, predictBatchSize, device.
  • Predict user movie ratings by calling predict function in Predict class.

Parameters

  1. Train class:
  • trainDatasetPath ==> Path for your training Dataset.
  • userLabelEncoderPath ==> Path in which you want to save user Label Encoder (this will be used in your prediction)
  • movieLabelEncoderPath ==> Path in which you want to save movie Label Encoder (this will be used your prediction)
  • validDatasetSize ==> Test size for train_test_split
  • trainBatchSize ==> The number of train samples to work through before updating the internal model parameters.
  • validBatchSize ==> The number of test samples to work through before updating the internal model parameters.
  • device ==> Device in which you want to train your model 'cuda' or 'cpu'. Default 'cpu'.
  • nEpochs ==> The number times that the learning algorithm will work through the entire training dataset.
  • trainedModelPath ==> Path to save your trained model (this will be used in your prediction)
  • randomState ==> Random State values for train_test_split
  1. Predict class:
  • datasetPath ==> Path for your prediction Dataset.
  • userLabelEncoderPath ==> Path in which you saved user Label Encoder (while training)
  • movieLabelEncoderPath ==> Path in which you saved movie Label Encoder (while training)
  • trainedModelPath ==> Path in which you saved Trained model (while training)
  • predictBatchSize ==> The number of prediction samples to work
  • device ==> Device in which you want to train your model 'cuda' or 'cpu'. Default 'cpu'.

Contributing

Currently, we are not accepting any pull requests! All PRs will be closed. If you want a feature or something doesn't work, please create an issue.

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

MovieRecEngine-0.1.1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

MovieRecEngine-0.1.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file MovieRecEngine-0.1.1.tar.gz.

File metadata

  • Download URL: MovieRecEngine-0.1.1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for MovieRecEngine-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5897d90859273c60860a1dc77d3b571e0ca13f0c90a11663dd8f35a57ee71ac3
MD5 4bde9d96f2b33975b4e3b08c27c06bfc
BLAKE2b-256 d5346bfdd38c52e13dcf2d3f365ce28638d9c2d74548695766bd1800a8cdbd17

See more details on using hashes here.

File details

Details for the file MovieRecEngine-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: MovieRecEngine-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for MovieRecEngine-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 258d36722b4b61b12c1c0c98c3d84dc2c66feb715a2d2a88ebd7dc2d27c0839f
MD5 6c5bb3f45ee125325561a1122b0aa178
BLAKE2b-256 ea54623a34cf472bfe2ab4158a9322505eb8f3048e4c49f1e4305301386bdf30

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