vdt / Recommender_System

CF item-based recommender system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is a collaborative filtering item-based recommender system.  User ratings are on a 5-star
scale.  The item-item similarity matrix is computed using Adjusted Cosine similarity.  Most 
data structures are serialized to disk and loaded into memory when needed.  This is to avoid 
repeating computationaly heavy tasks. This code can be extended to recommend books on a per 
user basis pretty easily.  It can also be extending to provide predictions on what a user
would rate a specific book using a weighted knn approach.


To test:

> python generate.py test

NOTE: test_bookset.pkl, test_ratings.pkl, indextobook.pkl, booktoindex.pkl, usertoindex.pkl must be in the same working directory inorder for test() to work. All "pickled" objects are provided for testing only. If you have access to the correct mysql dataset these object are generated for you.

The visualization of item similarities is shown in bookrec.html.

About

CF item-based recommender system