All Projects → chyikwei → Recommend

chyikwei / Recommend

recommendation system with python

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Recommend

Deeprec
An Open-source Toolkit for Deep Learning based Recommendation with Tensorflow.
Stars: ✭ 954 (+235.92%)
Mutual labels:  matrix-factorization, recommendation-system
Cornac
A Comparative Framework for Multimodal Recommender Systems
Stars: ✭ 308 (+8.45%)
Mutual labels:  matrix-factorization, recommendation-system
Recommendation-System-Baseline
Some common recommendation system baseline, with description and link.
Stars: ✭ 34 (-88.03%)
Mutual labels:  matrix-factorization, recommendation-system
Recsys2019 deeplearning evaluation
This is the repository of our article published in RecSys 2019 "Are We Really Making Much Progress? A Worrying Analysis of Recent Neural Recommendation Approaches" and of several follow-up studies.
Stars: ✭ 780 (+174.65%)
Mutual labels:  matrix-factorization, recommendation-system
retailbox
🛍️RetailBox - eCommerce Recommender System using Machine Learning
Stars: ✭ 32 (-88.73%)
Mutual labels:  matrix-factorization, recommendation-system
recommender system with Python
recommender system tutorial with Python
Stars: ✭ 106 (-62.68%)
Mutual labels:  matrix-factorization, recommendation-system
Tf-Rec
Tf-Rec is a python💻 package for building⚒ Recommender Systems. It is built on top of Keras and Tensorflow 2 to utilize GPU Acceleration during training.
Stars: ✭ 18 (-93.66%)
Mutual labels:  matrix-factorization, recommendation-system
yelper recommendation system
Yelper recommendation system
Stars: ✭ 117 (-58.8%)
Mutual labels:  recommendation-system
Deep-Learning-Model-for-Hybrid-Recommendation-Engine
A Hybrid recommendation engine built on deep learning architecture, which has the potential to combine content-based and collaborative filtering recommendation mechanisms using a deep learning supervisor
Stars: ✭ 19 (-93.31%)
Mutual labels:  recommendation-system
Person-Recommendation-Algorithms
推荐算法个人学习笔记以及代码实战
Stars: ✭ 50 (-82.39%)
Mutual labels:  recommendation-system
toptal-recommengine
Prototype recommendation engine built to accompany an article on Toptal Blog
Stars: ✭ 109 (-61.62%)
Mutual labels:  recommendation-system
PHDMF
This is a new deep learning model for recommender system, which we called PHD
Stars: ✭ 33 (-88.38%)
Mutual labels:  matrix-factorization
galileo
Scala Math - Numerical (Matlab-like) and Symbolic (Mathematica-like) tool
Stars: ✭ 62 (-78.17%)
Mutual labels:  matrix-factorization
rec-a-sketch
content discovery... IN 3D
Stars: ✭ 45 (-84.15%)
Mutual labels:  matrix-factorization
Neural Collaborative Filtering
pytorch version of neural collaborative filtering
Stars: ✭ 263 (-7.39%)
Mutual labels:  matrix-factorization
Awesome-Machine-Learning-Papers
📖Notes and remarks on Machine Learning related papers
Stars: ✭ 35 (-87.68%)
Mutual labels:  matrix-factorization
Librec
LibRec: A Leading Java Library for Recommender Systems, see
Stars: ✭ 3,045 (+972.18%)
Mutual labels:  matrix-factorization
SLIM-recommendation
A simple recommendation evaluation system, the algorithm includes SLIM, LFM, ItemCF, UserCF
Stars: ✭ 39 (-86.27%)
Mutual labels:  recommendation-system
deep recommenders
Deep Recommenders
Stars: ✭ 214 (-24.65%)
Mutual labels:  recommendation-system
Knowledge Graph based Intent Network
Learning Intents behind Interactions with Knowledge Graph for Recommendation, WWW2021
Stars: ✭ 116 (-59.15%)
Mutual labels:  recommendation-system

Build Status Coverage Status Recommend

Simple recommendatnion system implementation with Python

Current model:

  • Probabilistic Matrix Factorization
  • Bayesian Matrix Factorization
  • Alternating Least Squares with Weighted Lambda Regularization (ALS-WR)

Reference:

  • "Probabilistic Matrix Factorization", R. Salakhutdinov and A.Mnih., NIPS 2008
  • "Bayesian Probabilistic Matrix Factorization using MCMC", R. Salakhutdinov and A.Mnih., ICML 2008
  • Matlab code: http://www.cs.toronto.edu/~rsalakhu/BPMF.html
  • "Large-scale Parallel Collaborative Filtering for the Netflix Prize", Y. Zhou, D. Wilkinson, R. Schreiber and R. Pan, 2008

Install:

# clone repoisitory
git clone [email protected]:chyikwei/recommend.git
cd recommend

# install numpy & scipy
pip install -r requirements.txt
pip install .

Getting started:

  • A jupyter notbook that compares PMF and BPMF model can be found here.

  • To run BPMF with MovieLens 1M dataset: First, download MovieLens 1M dataset and unzip it (data will be in ml-1m folder). Then run:

>>> import numpy as np
>>> from recommend.bpmf import BPMF
>>> from recommend.utils.evaluation import RMSE
>>> from recommend.utils.datasets import load_movielens_1m_ratings

# load user ratings
>>> ratings = load_movielens_1m_ratings('ml-1m/ratings.dat')
>>> n_user = max(ratings[:, 0])
>>> n_item = max(ratings[:, 1])
>>> ratings[:, (0, 1)] -= 1 # shift ids by 1 to let user_id & movie_id start from 0

# fit model
>>> bpmf = BPMF(n_user=n_user, n_item=n_item, n_feature=10,
                max_rating=5., min_rating=1., seed=0).fit(ratings, n_iters=20)
>>> RMSE(bpmf.predict(ratings[:, :2]), ratings[:,2]) # training RMSE
0.79784331768263683

# predict ratings for user 0 and item 0 to 9:
>>> bpmf.predict(np.array([[0, i] for i in xrange(10)]))
array([ 4.35574067,  3.60580936,  3.77778456,  3.4479072 ,  3.60901065,
        4.29750917,  3.66302187,  4.43915423,  3.85788772,  4.02423073])
  • Complete examples can be found in examples/ folder. The scripts will download MovieLens 1M dataset automatically, run PMF(BPMF) model and show training/validation RMSE.

Running Test:

python setup.py test

or run test with coverage:

coverage run --source=recommend setup.py test
coverage report -m

Uninstall:

pip uninstall recommend

Notes:

  • Old version code can be found in v0.0.1. It contains a Probabilistic Matrix Factorization model with theano implementation.

  • The previous version (0.2.1) did not implement correctly MCMC sampling in the BPMF algorithm. In fact, at every timestep it computed the predictions basing on the current value of the feature matrices, and used it to estimate the RMSE. This has no meaning from the MCMC point of view, whose purpose is to sample the feature matrices from the correct distributions in order to estimate the integral through which the rating ditribution is computed. Instead, the correct approach (see Eq. 10 in reference [2]) entails averaging the predictions at every time step to get a final prediction and compute the RMSE. Essentially, the predicted value itself does not depend only on the last extracted value for the feature matrices, but on the whole chain. Having modified this, the RMSE for both the train and test set with BPMF improves (you can see it in this notebook). (Thanks LoryPack's contribution!)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].