Git Product home page Git Product logo

movierecengine-pypi's Introduction

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.

movierecengine-pypi's People

Contributors

mrr0b0t-23 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.