Skip to content

thaoth58/recommendation-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Recommendation system research

Recommendation system is aim to recommend some items to user. It can be devided into:

  1. User-based collaborative filtering
  2. Item-based collaborative filtering

alt text

We use kNN to find the similar users/items.

Based on data, we will calculate the similarity among users/items for kNN by:

  • Jaccard similarity
  • Euclidean distance
  • Manhattan distance
  • Minkowski distance
  • Cosine similarity

All of those measure methods were implemented in python (measure.py).

Example

We have a user-drink ratings matrix M below, where 6 users (rows) have rated 6 drink type (columns). Ratings can take up integer values from 1–10 and 0 indicates absence of rating. Now we have to decide that we should recommend coffee to user 2 (currently he is active user) or not. Assuming that user 2 will only like coffee if his rate is greater or equal to 5.

alt text

This problem can be resolved by 2 ways:

  1. User-based collaborative filtering:
  • Using kNN to find k most similar user with action user.

  • In order to predict the coffee rate of active user, we use the function: alt text

    Where:

    • r(x,s) is the prediction for active user x for item s
    • r(x) is the average rating of user x
    • r(y,s) is rate of user y with item s
    • sim(x,y) is the similarity between users a and u
    • S(xy) is the neighborhood of most similar users.
  1. Item-based collaborative filtering:
  • Using kNN to find k most similar items with coffee.
  • Calculate average of active user's rating with other drink type. This will be rate of active user with coffee.

This example will be solved in coffee-recommend.py

Reference:

  1. Recommender Systems — User-Based and Item-Based Collaborative Filtering
  2. Collaborative Filtering based Recommendation Systems exemplified..
  3. Item-Based Collaborative Filtering Recommendation Algorithms
  4. User-Based Collaborative-Filtering Recommendation Algorithms on Hadoop

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages