Git Product home page Git Product logo

keras-movielens-cf's Introduction

keras-movielens-cf

A set of Jupyter notebooks demonstrating a simple Keras implmentation of matrix factorization for collaborative filtering. The notebooks use the MovieLens 1M Dataset [1] to show the effectiveness of the architecture. Using 120-dimensional embeddings for users and movies, we achieve an RMSE of 0.862 on a held-out validation set after 15 epochs, taking under 18 minutes on an AWS EC2 g2.2xlarge instance with an NVIDIA GRID K520 GPU.

The notebooks provide the following workflows:

  • MovieLens 1M ETL: loads and processes user, movie and ratings data to prepare them for input into the Keras model.
  • MovieLens Training: trains an instance of CFModel using the prepared MovieLens data.
  • MovieLens Recommendations: shows recommendations generated using the trained model for a given test user.

Requirements

  • Python 2.7
  • A copy of the MovieLens 1M dataset, downloaded from [2].

Dependencies

  • pandas (0.18.1)
  • matplotlib (1.5.2)
  • keras (1.0.5)
  • numpy (1.11.1)
  • h5py (2.6.0)

License

MIT. See the LICENSE file for the copyright notice.

References

[1] F. Maxwell Harper and Joseph A. Konstan. 2015. The MovieLens Datasets: History and Context. ACM Trans. Interact. Intell. Syst. 5, 4, Article 19 (December 2015).

[2] MovieLens 1M Dataset. http://grouplens.org/datasets/movielens/1m/. Last downloaded 2016-08-14.

keras-movielens-cf's People

Contributors

bradleypallen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

keras-movielens-cf's Issues

Item to item Recoomandation

I see your code. I found a function rate in CFModel that take user id or item id to predict output. So i need another function for item to item that take item id , item id2 and we produce item to item .

return self.predict([np.array([item_id]), np.array([item_id2])])[0][0]

Am i right ?

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.