Skip to content

A recommender system using collaborative filtering written in python.

Notifications You must be signed in to change notification settings

Menghongli/recommender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Recommender

A recommender system using collaborative filtering (CF) written in python. And compare result between memory-based and low rank matrix factorization approaches.

Requirements

  • Python 3+
  • Numpy
  • Pickle
  • sklearn (Only used to caculat root mean squared error(RMSE))

Data

The data is from a collection collected by the GroupLens research group.

Book-Crossing [https://grouplens.org/datasets/book-crossing/]

Preparation

Download the data from GroupLens, uncompress the csv version into /data folder and then run the following scripts

from tool import *
dumpDataMat()

Evaluation

import evaluation
evaluation = Evaluation()
evaluation.evalByAccuracy(recommender = rc.ItemBased(simMeasure=cosSim))
evaluation.evalByAccuracy(recommender = rc.ItemBased(simMeasure=euclidSim))
evaluation.evalByAccuracy(recommender = rc.ItemBased(simMeasure=pearsSim))
evaluation.evalByAccuracy(recommender = rc.UserBased(simMeasure=cosSim))
evaluation.evalByAccuracy(recommender = rc.UserBased(simMeasure=euclidSim))
evaluation.evalByAccuracy(recommender = rc.UserBased(simMeasure=pearsSim))
evaluation.evalByAccuracy(recommender = rc.MatrixFactorization(K = 10))

About

A recommender system using collaborative filtering written in python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages