Recommender Systems with Surprise
Project with examples of different recommender systems created with the Surprise framework. Different algorithms (with a collaborative filtering approach) are explored, such as KNN or SVD.
1. RS with KNN
- Model built from a plain text file
- The algorithm used is: KNNBasic
- Model trained using the technique of cross validation (5 folds)
- The RMSE and MAE metrics were used to estimate the model error
- Type of filtering: user-based collaborative
2. RS with SVD
- Model built from a Pandas dataframe
- The algorithm used is: Singular Value Decomposition (SVD)
- Model trained using train and test datasets (80/20)
- The error of the model was estimated using the RMSE metric
- Type of filtering: collaborative
3. Tune model (SVD)
- Model tuning: manual
- Model tuning: automatic
- Compute precision@k and recall@k
MovieLens datasets were collected by the GroupLens Research Project at the University of Minnesota.
This data set consists of:
- 100,000 ratings (1-5) from 943 users on 1682 movies.
- Each user has rated at least 20 movies.
- Simple demographic info for the users (age, gender, occupation, zip)
Table format: u.data
|user id||item id||rating||timestamp|
Table format: u.item
|movie id||movie title||release date||IMDb URL|
|1||Toy Story (1995)||01-Jan-1995||http://us.imdb.com/M/title-exact?Toy%20Story%20(1995)|
|3||Four Rooms (1995)||01-Jan-1995||http://us.imdb.com/M/title-exact?Four%20Rooms%20(1995)|
|4||Get Shorty (1995)||01-Jan-1995||http://us.imdb.com/M/title-exact?Get%20Shorty%20(1995)|
Table format: u.user
|user id||age||gender||occupation||zip code|
You can see the original dataset here
conda install -c conda-forge scikit-surprise
Contributing and Feedback
Any kind of feedback/criticism would be greatly appreciated (algorithm design, documentation, improvement ideas, spelling mistakes, etc…).
- Created by Andrés Segura Tinoco
- Created on May 23, 2019
This project is licensed under the terms of the MIT license.
I would like to show my gratitude to:
F. Maxwell Harper and Joseph A. Konstan. 2015. The MovieLens Datasets: History and Context. ACM Transactions on Interactive Intelligent Systems (TiiS) 5, 4, Article 19 (December 2015), 19 pages. DOI = http://dx.doi.org/10.1145/2827872