Python and Cython implementation of state-of-the-art collaborative filtering models.
I implemented the RecModel package in my master thesis, during which I implemented and tested state-of-the art collaborative filtering models with a Python interface. The implemented models are:
-
Neighbor: Item-to-item neighborhood-based collaborative filtering models using the euclidian, minowski, cosine, jaccard, correlation, adjusted cosine and adjusted correlation as similarity functions.
-
SLIM: Sparse Linear Methods for Top-N Recommender Systems.
-
VAE: Variational Autoencoders for Collaborative Filtering.
-
EASE: Embarrassingly Shallow Autoencoders for Sparse Data.
-
WMF: Weighted and non-weighted Matrix factorization, including optional user and item biases.
-
RecWalk: Nearly Uncoupled Random Walks for Top-N Recommendation.
The best way to get started with the package is to look at the example.ipynb Notebook!
To run the models and compile the cython code the following packages need be installed:
- numpy
- pandas
- scipy
- torch
- sklearn
- tqdm
- cython
- ctypes
- sharedmem
Additionally, the Cython code needs to be compiled. To do so change to the Models/fast_utils directory:
cd RecModel/fast_utils
and compile the Cython code with:
python setup_models.py build_ext --inplace
- Tim Toebrock - titoeb