Collaborative Filtering for Implicit Feedback Datasets
Maintained. Last release 7 months ago. Weaker on release cadence.
pip install implicitImplicit
Fast Python Collaborative Filtering for Implicit Datasets.
This project provides fast Python implementations of several different popular recommendation algorithms for implicit feedback datasets:
-
Alternating Least Squares as described in the papers Collaborative Filtering for Implicit Feedback Datasets and Applications of the Conjugate Gradient Method for Implicit Feedback Collaborative Filtering.
-
Item-Item Nearest Neighbour models using Cosine, TFIDF or BM25 as a distance metric.
All models have multi-threaded training routines, using Cython and OpenMP to fit the models in parallel among all available CPU cores. In addition, the ALS and BPR models both have custom CUDA kernels - enabling fitting on compatible GPU's. Approximate nearest neighbours libraries such as Annoy, NMSLIB and Faiss can also be used by Implicit to speed up making recommendations.
Installation
Implicit can be installed from pypi with:
pip install implicit
Installing with pip will use prebuilt binary wheels on x86_64 Linux, Windows and OSX. These wheels include GPU support on Linux.
Implicit can also be installed with conda:
# CPU only package
conda install -c conda-forge implicit
# CPU+GPU package
conda install -c conda-forge implicit implicit-proc=*=gpu