Skip to main content

Collaborative Filtering for Implicit Feedback Datasets

Project description

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 blog posts 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 has been tested with Python 3.6, 3.7, 3.8, 3.9 and 3.10 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

implicit-0.6.1-cp310-cp310-win_amd64.whl (633.2 kB view details)

Uploaded CPython 3.10 Windows x86-64

implicit-0.6.1-cp310-cp310-manylinux2014_x86_64.whl (18.6 MB view details)

Uploaded CPython 3.10

implicit-0.6.1-cp310-cp310-macosx_11_0_arm64.whl (662.3 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

implicit-0.6.1-cp310-cp310-macosx_10_9_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

implicit-0.6.1-cp310-cp310-macosx_10_9_universal2.whl (1.3 MB view details)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)

implicit-0.6.1-cp39-cp39-win_amd64.whl (645.9 kB view details)

Uploaded CPython 3.9 Windows x86-64

implicit-0.6.1-cp39-cp39-manylinux2014_x86_64.whl (18.6 MB view details)

Uploaded CPython 3.9

implicit-0.6.1-cp39-cp39-macosx_11_0_arm64.whl (661.9 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

implicit-0.6.1-cp39-cp39-macosx_10_9_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

implicit-0.6.1-cp39-cp39-macosx_10_9_universal2.whl (1.3 MB view details)

Uploaded CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64)

implicit-0.6.1-cp38-cp38-win_amd64.whl (646.1 kB view details)

Uploaded CPython 3.8 Windows x86-64

implicit-0.6.1-cp38-cp38-manylinux2014_x86_64.whl (18.6 MB view details)

Uploaded CPython 3.8

implicit-0.6.1-cp38-cp38-macosx_11_0_arm64.whl (646.7 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

implicit-0.6.1-cp38-cp38-macosx_10_9_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

implicit-0.6.1-cp38-cp38-macosx_10_9_universal2.whl (1.3 MB view details)

Uploaded CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64)

implicit-0.6.1-cp37-cp37m-win_amd64.whl (632.1 kB view details)

Uploaded CPython 3.7m Windows x86-64

implicit-0.6.1-cp37-cp37m-manylinux2014_x86_64.whl (18.6 MB view details)

Uploaded CPython 3.7m

implicit-0.6.1-cp37-cp37m-macosx_10_9_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

implicit-0.6.1-cp36-cp36m-win_amd64.whl (632.1 kB view details)

Uploaded CPython 3.6m Windows x86-64

implicit-0.6.1-cp36-cp36m-manylinux2014_x86_64.whl (18.6 MB view details)

Uploaded CPython 3.6m

implicit-0.6.1-cp36-cp36m-macosx_10_9_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

Details for the file implicit-0.6.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: implicit-0.6.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 633.2 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for implicit-0.6.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 414bac3c688a9f03522fe753b75d6fd2d09d0e09ad6d2a4f544aadab67d7a16f
MD5 5aa307625071fe801cac31985fe60e37
BLAKE2b-256 cfa7b6e59e3acff0d4ef957549bb853cb80b5384d9825d1c231a47f58dc7f185

See more details on using hashes here.

File details

Details for the file implicit-0.6.1-cp310-cp310-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for implicit-0.6.1-cp310-cp310-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dcdba18d7293a74ea13ad5f468cf00965048ace81254a262c3a6fa5356f759d8
MD5 56a6214203457f56482955751a986002
BLAKE2b-256 9687296f22f99ee775bb63dbb072dcad54546b701b91232d845fe4f63b2213f8

See more details on using hashes here.

File details

Details for the file implicit-0.6.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for implicit-0.6.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7fa64a55769ca9e140a343672e381c0bd112d14d590d5ad3cbd99df90f9a4f02
MD5 88f49d5d1e205f491d8a9e6b794bc8db
BLAKE2b-256 f1f52155e66202ab3291b0ad8228cdf6b0443dc82f9ea5675a44e4a212366b70

See more details on using hashes here.

File details

Details for the file implicit-0.6.1-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for implicit-0.6.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fe7fa8838465ef1bc9246b7498f0e15c2a2bda8615cff3dc3195dfb4feceecdc
MD5 0baef3f33d8572684a9ed62bf45afd3b
BLAKE2b-256 8aca83be6282def2dfa6e9ecc8a585803ce10e99bd9f49e208c1b814d5663550

See more details on using hashes here.

File details

Details for the file implicit-0.6.1-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for implicit-0.6.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 e9acad8508e11589c27a31b4111addeff1839cc555feda462dceb86b2ac382fa
MD5 8f035a305e7bafe34c64191611685246
BLAKE2b-256 ecf896e5f0307917c47e0c7e191b893b7c295313f790aab299e4181d7bb0761d

See more details on using hashes here.

File details

Details for the file implicit-0.6.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: implicit-0.6.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 645.9 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for implicit-0.6.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4a93e682bf827895cf7e4b68ea554cd20b4fca6c0ea301dc7223937f5f39027a
MD5 ba6cfdba176054c2047e81b4d7eb7979
BLAKE2b-256 f1e90d684b00b42a869a057de7f4e1e2453c39e977d6da5030a86d7d2e8d8acd

See more details on using hashes here.

File details

Details for the file implicit-0.6.1-cp39-cp39-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for implicit-0.6.1-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 42abe47b71a5b45aa3336b8d7837d4cfd9224742844b273c16ee2da43dc9c767
MD5 193bde509c2c551506792eb9caeb36e6
BLAKE2b-256 4646dc4d5cfe86b5d3274b2f0f1567647594604dce487667faa5956ac6a65761

See more details on using hashes here.

File details

Details for the file implicit-0.6.1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for implicit-0.6.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 657d15c0184b5afbeb4db6eb681d58032c7c1471a643d9e18d9a354172ec4eb6
MD5 b2a0943ed99eff50fc2f5f7067a31095
BLAKE2b-256 be11443e547e5be64cd9b79374b18ada00cec250a350a9c10870d6e282a4b621

See more details on using hashes here.

File details

Details for the file implicit-0.6.1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for implicit-0.6.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4ef0aeca203d9db73b16e7eba6db861e22106280f7ceec2873a24a20c69a7da0
MD5 41d65aff695e8702bb92168067e5bd25
BLAKE2b-256 7dd879c960621bb142a5db983862a674b4cd0f3aa4017548a20b89d6d3800d27

See more details on using hashes here.

File details

Details for the file implicit-0.6.1-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for implicit-0.6.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 96a3260cf21396e90722e316624e45344faacd44437e9479f0ef91cce9f8dd2b
MD5 94cda114ac50adf1f9ecb65948724a7c
BLAKE2b-256 b384fc435908517ec27ca04e659e5995601c9b69a61962bdff6f4f9d0d1e4d0a

See more details on using hashes here.

File details

Details for the file implicit-0.6.1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: implicit-0.6.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 646.1 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for implicit-0.6.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 3e4cce205280c752088f8c48038831b33a90e046e38370550cf5107b1ba357cc
MD5 2b2a78f8b2798329512906596e1d0bc8
BLAKE2b-256 91fc79efca164978e28f194f620877486ff06e0e865d00be5144875bb288baff

See more details on using hashes here.

File details

Details for the file implicit-0.6.1-cp38-cp38-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for implicit-0.6.1-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5054fac3f4d4a41ed590f69f7f9390f240b2bee4e6554ec03a6335c65b549142
MD5 76469749f99bb197d2f182f439b87e14
BLAKE2b-256 07c3ef885166794ba279f8cb4d7afe4a236c475630527139a03d6be6d106cd4d

See more details on using hashes here.

File details

Details for the file implicit-0.6.1-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for implicit-0.6.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 747cfc1f6daa4ee30d02fb2069da1cd87c470d40aecf9a10b23f01d93b12f94b
MD5 12b86f4771f18ac07579205ba45a0fc4
BLAKE2b-256 2b9e6300b7b1102f4e2f5de216cca4727bf668cf0939aa3eb23bfa53bea36363

See more details on using hashes here.

File details

Details for the file implicit-0.6.1-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for implicit-0.6.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 22dc374fcdead642cb9b29e7b333377260d789a9180b17e87248d914999952fa
MD5 6d387390f22626b7ee597cb80a882444
BLAKE2b-256 20ceb7cc5b5389057675c90a190f90a9615e3ba2ba5bb01799e9b64299859d78

See more details on using hashes here.

File details

Details for the file implicit-0.6.1-cp38-cp38-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for implicit-0.6.1-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 19d8b7e6509f225340ab13e9fa7659619c3b0d683c22ef98a551c4e0b75583dc
MD5 561571b32151d9ae81ffd68e27d1e748
BLAKE2b-256 064d11ef850793e5f820353641af321bd6dd606550b2f030380da6eb3375b4a3

See more details on using hashes here.

File details

Details for the file implicit-0.6.1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: implicit-0.6.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 632.1 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for implicit-0.6.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 01814a302de28c1eb9f582203b37a9735b243383aaf1218cab1bbaf8a58fae8b
MD5 0a3ba231d522137a24ff69cd4dced7b9
BLAKE2b-256 1eeb005eef939672801ac6fa311a40402d55ffb86824e8c700fbb4276314ad73

See more details on using hashes here.

File details

Details for the file implicit-0.6.1-cp37-cp37m-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for implicit-0.6.1-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2581f7d419e195a321509f637f4f42c6136ffc08707080e39b3820f94fd37039
MD5 7a212608c74ccaef6476a89210509d79
BLAKE2b-256 995bbaef296f805c0ada1bd92ebcbb09e76f88748db20476432f7ec119c701a9

See more details on using hashes here.

File details

Details for the file implicit-0.6.1-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for implicit-0.6.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 07eeb24208a651abed85cfd337b75499057176fb55813605e6865648316991fa
MD5 0a454a41890fc92b01e88d16aa3c82ef
BLAKE2b-256 c87645bc55c9761e0942854df2bb6f97a7d5861c0e366f5c04ab259de2219964

See more details on using hashes here.

File details

Details for the file implicit-0.6.1-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: implicit-0.6.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 632.1 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for implicit-0.6.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 be65ad838d0d2a03f4d10542a137ffaaba6993868180fc0893d80a7fe81be1ca
MD5 7afa3043f34bb378bbb981a3ef56f8b4
BLAKE2b-256 203d472fa1a69b7107bfef83259758299cf2007745520ba7a3668472995d0f53

See more details on using hashes here.

File details

Details for the file implicit-0.6.1-cp36-cp36m-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for implicit-0.6.1-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f6b750568ee524ae56a5185d594503685987fc5c1968a2058850404b0c3a994c
MD5 0c024fe4870a54e41b128d8f886ab43e
BLAKE2b-256 cc5fcf49545d0bef05cf4ea9f31ff2b7516ce5da3416a07dc848895c6e104e3d

See more details on using hashes here.

File details

Details for the file implicit-0.6.1-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for implicit-0.6.1-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 711c4494b93c927e5cf957a224d67ba8e957053afbd7b2d55bc76f15da9ea4f4
MD5 d58dc9879d80a3feed55f085b1e567e1
BLAKE2b-256 52acbb3d371be3dbd33baee93278fcd017216d5e009f23c12b9dba76b218c87a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page