Skip to main content

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

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(user_item_data)

# recommend items for a user
recommendations = model.recommend(userid, user_item_data[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:

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 OPENBLAS_NUM_THREADS=1'. This disables its internal multithreading ability, which leads to substantial speedups for this package. Likewise for Intel MKL, setting 'export MKL_NUM_THREADS=1' should also be set.

Released under the MIT License

Metadata

Release files for wbimplicit 0.6.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wbimplicit 0.6.2.1
File Size Uploaded
wbimplicit-0.6.2.1.tar.gz 69.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for wbimplicit 0.6.2.1
File
wbimplicit-0.6.2.1-cp311-cp311-manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
wbimplicit-0.6.2.1-cp311-cp311-manylinux2014_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ ARM64 Details
wbimplicit-0.6.2.1-cp310-cp310-manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
wbimplicit-0.6.2.1-cp310-cp310-manylinux2014_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ ARM64 Details
wbimplicit-0.6.2.1-cp39-cp39-manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
wbimplicit-0.6.2.1-cp39-cp39-manylinux2014_aarch64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ ARM64 Details

Total release size: 30.3 MB

Release files / wbimplicit-0.6.2.1.tar.gz

Download URL wbimplicit-0.6.2.1.tar.gz
Size 69.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d03d79a1ec968786b5828069a50cecc3ac633668df07e504aebf5e2b88878757
BLAKE2b-256 checksum
How to use checksums
09ae8936408b30f63e4ff734a9a2e96b1abe59205dc808c38de8e3aeb35b57df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / wbimplicit-0.6.2.1-cp311-cp311-manylinux2014_x86_64.whl

Download URL wbimplicit-0.6.2.1-cp311-cp311-manylinux2014_x86_64.whl
Size 9.2 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
c689d5d16b0a5ffd5ee316fb1a565b6f9bff3624d173a1b65345e5ff3c026b7b
BLAKE2b-256 checksum
How to use checksums
8f08ef2ebf62382776c9c9f40bc4d146f4ed9e3399d673aa3fd7d2af27edd5d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / wbimplicit-0.6.2.1-cp311-cp311-manylinux2014_aarch64.whl

Download URL wbimplicit-0.6.2.1-cp311-cp311-manylinux2014_aarch64.whl
Size 885.2 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
c5b383acfbab19d86ef4304ea09106b0fa2498f54f06f3b19e349e73da59080c
BLAKE2b-256 checksum
How to use checksums
2043728aa44fbbb0ab05db771d3ee68f7b4baea3c0d7447211d7e8a1f4d757f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / wbimplicit-0.6.2.1-cp310-cp310-manylinux2014_x86_64.whl

Download URL wbimplicit-0.6.2.1-cp310-cp310-manylinux2014_x86_64.whl
Size 9.2 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
4e65ed70d6dd96905d82dd23df7c6b1a7dd8e78bf38917073ab292928f452084
BLAKE2b-256 checksum
How to use checksums
bfc35bef55da55a656484978dd934f5c65a12f31bc1dc970d636fb765af090ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / wbimplicit-0.6.2.1-cp310-cp310-manylinux2014_aarch64.whl

Download URL wbimplicit-0.6.2.1-cp310-cp310-manylinux2014_aarch64.whl
Size 886.7 kB
Tags CPython 3.10 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
4257e9ad57cc34e85afd52c6e6e8c62b6c6f935998aa74c357be88959916a68a
BLAKE2b-256 checksum
How to use checksums
4c2a39f4be007592a400e2dcd37087cee47e48e8717f0291d359878c90af5f48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / wbimplicit-0.6.2.1-cp39-cp39-manylinux2014_x86_64.whl

Download URL wbimplicit-0.6.2.1-cp39-cp39-manylinux2014_x86_64.whl
Size 9.2 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
ee023b7e112a1dc44a4bb5b1ff9e866eb1ef9688d3d33192dd5c87a174860815
BLAKE2b-256 checksum
How to use checksums
b0b2a595c6bf7f6a2664c99b648a623814b01b775dbc00a5784d9f2b285eb247
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / wbimplicit-0.6.2.1-cp39-cp39-manylinux2014_aarch64.whl

Download URL wbimplicit-0.6.2.1-cp39-cp39-manylinux2014_aarch64.whl
Size 900.3 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
d131cbea7c0a963fc35c41be93ecd0e02301ab2620fbcded8aefc6df7fa4a044
BLAKE2b-256 checksum
How to use checksums
54d483f0876a42c1df42cc9ee26811f382badba0330c013ec778ffafc765fb86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release history Release notifications | RSS feed

This release

0.6.2.1 This release

7 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page