implicit

Fast Python Collaborative Filtering for Implicit Feedback Datasets

https://github.com/benfred/implicit

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

collaborative-filtering machine-learning matrix-factorization recommendation recommendation-system recommender-system

Keywords from Contributors

optimizing-compiler tensors jax
Last synced: 6 months ago · JSON representation

Repository

Fast Python Collaborative Filtering for Implicit Feedback Datasets

Basic Info
Statistics
  • Stars: 3,702
  • Watchers: 76
  • Forks: 622
  • Open Issues: 103
  • Releases: 7
Topics
collaborative-filtering machine-learning matrix-factorization recommendation recommendation-system recommender-system
Created almost 10 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License

README.md

Implicit

Build
Status Documentation

Fast Python Collaborative Filtering for Implicit Datasets.

This project provides fast Python implementations of several different popular recommendation algorithms for implicit feedback datasets:

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:

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

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

All Time
  • Total Commits: 359
  • Total Committers: 35
  • Avg Commits per committer: 10.257
  • Development Distribution Score (DDS): 0.237
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email 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...

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
enhancement (1)
Pull Request Labels
bug (12) enhancement (12) chore (7) dependencies (6) documentation (5) performance (1) ci (1)

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

  • Versions: 46
  • Dependent Packages: 12
  • Dependent Repositories: 195
  • Downloads: 405,640 Last month
  • Docker Downloads: 713
Rankings
Dependent packages count: 0.7%
Downloads: 0.9%
Dependent repos count: 1.1%
Average: 1.3%
Stargazers count: 1.3%
Docker downloads count: 1.7%
Forks count: 2.1%
Maintainers (2)
Last synced: 6 months ago
proxy.golang.org: github.com/benfred/implicit
  • Versions: 21
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 7.0%
Average: 8.2%
Dependent repos count: 9.3%
Last synced: 6 months ago
pypi.org: nautik-als

Collaborative Filtering for Implicit Datasets

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 10 Last month
Rankings
Stargazers count: 1.3%
Forks count: 2.1%
Dependent packages count: 7.3%
Dependent repos count: 22.1%
Average: 22.6%
Downloads: 80.1%
Maintainers (1)
Last synced: 6 months ago
pypi.org: wbimplicit

Collaborative Filtering for Implicit Feedback Datasets

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 28 Last month
Rankings
Stargazers count: 1.3%
Forks count: 2.1%
Dependent packages count: 7.5%
Average: 25.3%
Downloads: 45.8%
Dependent repos count: 69.6%
Maintainers (1)
Last synced: 6 months ago
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

  • Versions: 14
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Forks count: 6.7%
Stargazers count: 7.2%
Average: 26.0%
Dependent repos count: 38.6%
Dependent packages count: 51.5%
Last synced: 6 months ago

Dependencies

.github/workflows/build.yml actions
  • 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
.github/workflows/release-drafter.yml actions
  • release-drafter/release-drafter v5 composite
requirements-dev.txt pypi
  • black ==22.3.0 development
  • codespell * development
  • flake8 * development
  • isort * development
  • pylint * development
  • pytest * development
  • scikit-build >=0.13.1 development
requirements.txt pypi
  • Cython >=0.24.0
  • scipy >=0.16.0
  • tqdm >=4.27.0
setup.py pypi
  • numpy *
pyproject.toml pypi