Code Monkey home page Code Monkey logo

recommender_collaborative's Introduction

Recommendation System with User-User Collaborative Filtering

Project Page
http://eugenelin89.github.io/recommender_collaborative/

SETUP

The system is built with LensKit, an open-source took kit for building recommenders.

Requires the following:

Java SE Development Kit 7 (http://www.oracle.com/technetwork/java/javase/downloads/index.html)
LensKit  (http://lenskit.grouplens.org)
Apache Maven (https://maven.apache.org)
Java IDE such as Eclipse (http://www.eclipse.org/) or IntelliJ IDEA (http://www.jetbrains.com/idea/).

BACKGROUND

This recommendation system prototype uses user-user collaborative filtering.  For detailed background, please refer to:
http://en.wikipedia.org/wiki/Collaborative_filtering

The algorithm is composed of the following steps.

1. Compute user similarities by taking the cosine between the users’ mean-centered rating vectors (that is, subtract each user's mean rating from their rating vector, and compute the cosine between those two vectors). 

2. For each item’s score, use the 30 most similar users who have rated the item.

3. Use mean-centering to normalize ratings for scoring by computing the weighted average of each neighbor’s offset from average and add the user’s average rating.

TEST DRIVE

A set of test data is provided for movie ratings, but can be easily adopted for other domains.


data/movie-titles.csv
Maps Movie IDs to Movie Titles.

data/ratings.csv
Users and their movie ratings. Each line of the CSV file is ordered as: User ID, Movie ID, Rating

data/users.csv
Maps User ID to User Name.

The test data is injected into the system in CBFMain.java in the method configureRecommender().

Run the recommender with command similar to the following:
run-uu 1024:77 1024:268 1024:462 1024:393 1024:36955 2048:77 2048:36955 2048:788

For each pair, the first item is the User ID and the second pair is the Movie ID.

Output from the above executiong command, using the test dataset:
2048,788,3.8509,Mrs. Doubtfire (1993)
2048,36955,3.9698,True Lies (1994)
2048,77,4.8493,Memento (2000)
1024,462,3.1082,Erin Brockovich (2000)
1024,393,3.8722,Kill Bill: Vol. 2 (2004)
1024,36955,2.3524,True Lies (1994)
1024,77,4.3848,Memento (2000)
1024,268,2.8646,Batman (1989)

recommender_collaborative's People

Contributors

eugenelin89 avatar

Watchers

James Cloos 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.