implicit
Fast Python Collaborative Filtering for Implicit Feedback Datasets
Science Score: 33.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
✓Committers with academic emails
4 of 35 committers (11.4%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.6%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Fast Python Collaborative Filtering for Implicit Feedback Datasets
Basic Info
- Host: GitHub
- Owner: benfred
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://benfred.github.io/implicit/
- Size: 7.51 MB
Statistics
- Stars: 3,702
- Watchers: 76
- Forks: 622
- Open Issues: 103
- Releases: 7
Topics
Metadata Files
README.md
Implicit
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 ```
Basic Usage
```python import implicit
initialize a model
model = implicit.als.AlternatingLeastSquares(factors=50)
train the model on a sparse matrix of user/item/confidence weights
model.fit(useritemdata)
recommend items for a user
recommendations = model.recommend(userid, useritemdata[userid])
find related items
related = model.similar_items(itemid) ```
The examples folder has a program showing how to use this to compute similar artists on the last.fm dataset.
For more information see the documentation.
Articles about Implicit
These blog posts describe the algorithms that power this library:
- Finding Similar Music with Matrix Factorization
- Faster Implicit Matrix Factorization
- Implicit Matrix Factorization on the GPU
- Approximate Nearest Neighbours for Recommender Systems
- Distance Metrics for Fun and Profit
There are also several other articles about using Implicit to build recommendation systems: * H&M Personalized Fashion Recommendations Kaggle Competition * Yandex Cup 2022: Like Prediction * Recommending GitHub Repositories with Google BigQuery and the implicit library * Intro to Implicit Matrix Factorization: Classic ALS with Sketchfab Models * A Gentle Introduction to Recommender Systems with Implicit Feedback.
Requirements
This library requires SciPy version 0.16 or later and Python version 3.6 or later.
GPU Support requires at least version 11 of the NVidia CUDA Toolkit.
This library is tested with Python 3.7, 3.8, 3.9, 3.10 and 3.11 on Ubuntu, OSX and Windows.
Benchmarks
Simple benchmarks comparing the ALS fitting time versus Spark can be found here.
Optimal Configuration
I'd recommend configuring SciPy to use Intel's MKL matrix libraries. One easy way of doing this is by installing the Anaconda Python distribution.
For systems using OpenBLAS, I highly recommend setting 'export OPENBLASNUMTHREADS=1'. This disables its internal multithreading ability, which leads to substantial speedups for this package. Likewise for Intel MKL, setting 'export MKLNUMTHREADS=1' should also be set.
Released under the MIT License
Owner
- Name: Ben Frederickson
- Login: benfred
- Kind: user
- Location: Vancouver, BC, Canada
- Company: @nvidia
- Website: https://www.benfrederickson.com
- Repositories: 39
- Profile: https://github.com/benfred
Working on open source data science tools @nvidia
GitHub Events
Total
- Issues event: 16
- Watch event: 170
- Issue comment event: 38
- Pull request event: 2
- Pull request review event: 4
- Fork event: 15
Last Year
- Issues event: 16
- Watch event: 170
- Issue comment event: 38
- Pull request event: 2
- Pull request review event: 4
- Fork event: 15
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Ben Frederickson | g****b@b****m | 274 |
| Hyunsung Lee | i****a@g****m | 32 |
| Eugene Scherba | e****a@g****m | 6 |
| ita | i****9@r****m | 5 |
| Tomasz Cheda | c****z@g****m | 3 |
| yanz | d****7@g****m | 3 |
| Andrew Burkard | a****d@t****m | 2 |
| Christian Hotz-Behofsits | c****s@g****m | 2 |
| Juarez Bochi | j****i@g****m | 2 |
| Mark Douthwaite | m****7@y****k | 2 |
| Neal Fultz | n****z@g****m | 2 |
| Tim Gates | t****s@i****m | 2 |
| 제프리 | j****y@b****m | 2 |
| titipata | t****a@u****u | 1 |
| iggy.lee | i****e@k****m | 1 |
| Egor Malykh | e****h@o****v | 1 |
| Dmytro Petruk | p****k@e****h | 1 |
| mrticker | 1****r | 1 |
| ds2268 | d****8@s****i | 1 |
| Yurij Mikhalevich | 0@3****t | 1 |
| Wei Zheng | i****1@g****m | 1 |
| Tych0n | N****v@g****m | 1 |
| Taylor G Smith | t****1@g****m | 1 |
| Martin Thoma | i****o@m****e | 1 |
| Kwon Soonmok | t****0@g****m | 1 |
| Jonas Johansson | j****s@g****m | 1 |
| James McNeilis | j****1@d****k | 1 |
| Iuri Queiroz | i****z@i****r | 1 |
| Dmytro Petruk | b****5@g****m | 1 |
| Daniel Julius Lasiman | d****n@g****m | 1 |
| and 5 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 133
- Total pull requests: 62
- Average time to close issues: 5 months
- Average time to close pull requests: 21 days
- Total issue authors: 119
- Total pull request authors: 15
- Average comments per issue: 3.79
- Average comments per pull request: 0.37
- Merged pull requests: 47
- Bot issues: 0
- Bot pull requests: 1
Past Year
- Issues: 14
- Pull requests: 6
- Average time to close issues: 3 days
- Average time to close pull requests: N/A
- Issue authors: 12
- Pull request authors: 3
- Average comments per issue: 0.93
- Average comments per pull request: 0.17
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- fkurushin (3)
- Blo0dR0gue (3)
- hemmat1991 (2)
- Selva163 (2)
- franzoni315 (2)
- zakirullin (2)
- mrticker (2)
- LeGabriel (2)
- josh-ashkinaze (2)
- benfred (2)
- levrone1987 (2)
- lyanv (1)
- jnhyeon (1)
- jperiodlangley (1)
- portkeys (1)
Pull Request Authors
- benfred (40)
- jmorlock (4)
- bos1988 (3)
- ita9naiwa (3)
- mgorny (2)
- characat0 (2)
- Soonmok (1)
- apat1n (1)
- timgates42 (1)
- jbochi (1)
- atakanfilgoz (1)
- dependabot[bot] (1)
- mrticker (1)
- chrisjkuch (1)
- lithammer (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 5
-
Total downloads:
- pypi 405,678 last-month
- Total docker downloads: 713
-
Total dependent packages: 12
(may contain duplicates) -
Total dependent repositories: 196
(may contain duplicates) - Total versions: 87
- Total maintainers: 4
pypi.org: implicit
Collaborative Filtering for Implicit Feedback Datasets
- Homepage: http://github.com/benfred/implicit/
- Documentation: https://implicit.readthedocs.io/
- License: MIT
-
Latest release: 0.7.2
published over 2 years ago
Rankings
proxy.golang.org: github.com/benfred/implicit
- Documentation: https://pkg.go.dev/github.com/benfred/implicit#section-documentation
- License: mit
-
Latest release: v0.7.2
published over 2 years ago
Rankings
pypi.org: nautik-als
Collaborative Filtering for Implicit Datasets
- Homepage: http://github.com/benfred/implicit/
- Documentation: https://nautik-als.readthedocs.io/
- License: MIT
-
Latest release: 0.0.5
published almost 6 years ago
Rankings
Maintainers (1)
pypi.org: wbimplicit
Collaborative Filtering for Implicit Feedback Datasets
- Homepage: http://github.com/benfred/implicit/
- Documentation: https://wbimplicit.readthedocs.io/
- License: MIT
-
Latest release: 0.6.2.1
published over 2 years ago
Rankings
Maintainers (1)
conda-forge.org: implicit
This project provides fast Python implementations of the algorithms described in the paper Collaborative Filtering for Implicit Feedback Datasets and in Applications of the Conjugate Gradient Method for Implicit Feedback Collaborative Filtering
- Homepage: http://github.com/benfred/implicit/
- License: MIT
-
Latest release: 0.5.2
published about 4 years ago
Rankings
Dependencies
- actions/checkout v3 composite
- actions/download-artifact v3 composite
- actions/setup-python v4 composite
- actions/setup-python v2 composite
- actions/upload-artifact v3 composite
- docker/setup-qemu-action v2 composite
- fnkr/github-action-ghr v1.3 composite
- pypa/cibuildwheel v2.11.3 composite
- release-drafter/release-drafter v5 composite
- black ==22.3.0 development
- codespell * development
- flake8 * development
- isort * development
- pylint * development
- pytest * development
- scikit-build >=0.13.1 development
- Cython >=0.24.0
- scipy >=0.16.0
- tqdm >=4.27.0
- numpy *