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.0-cp310-cp310-win_amd64.whl (630.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

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

Uploaded CPython 3.10

implicit-0.6.0-cp310-cp310-macosx_11_0_arm64.whl (660.3 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

implicit-0.6.0-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.0-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.0-cp39-cp39-win_amd64.whl (642.9 kB view details)

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.9

implicit-0.6.0-cp39-cp39-macosx_11_0_arm64.whl (659.1 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

implicit-0.6.0-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.0-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.0-cp38-cp38-win_amd64.whl (642.8 kB view details)

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8

implicit-0.6.0-cp38-cp38-macosx_11_0_arm64.whl (644.2 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

implicit-0.6.0-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.0-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.0-cp37-cp37m-win_amd64.whl (630.1 kB view details)

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m

implicit-0.6.0-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.0-cp36-cp36m-win_amd64.whl (630.0 kB view details)

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m

implicit-0.6.0-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.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: implicit-0.6.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 630.1 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.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ecc201d62dcfc5b077889add548ba111d383348880ef0cd9f2506ed0806c8c5c
MD5 b70fa6f24412d5f1cfbfefdf88b3ffca
BLAKE2b-256 227845e5f143fb75268c7778f92615a70c3e764d945a463730ec7a40e44908d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for implicit-0.6.0-cp310-cp310-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 48996c423dc08a69fc8f83a6fab80369d587580687a72d229ac8f70a6358f906
MD5 56548bfb6613fe54556d171056de47e0
BLAKE2b-256 a3204f88f6787036e0a045db38fdd9309f96a42a81f7feb5eb6c975644977fe8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for implicit-0.6.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 355a38e215d7dc2bc1f05fd53c7584c86260238a0a5fcf116c61d4b387576ca7
MD5 a4deb0ad1b79acf9f5a6c7b35b983a59
BLAKE2b-256 cd7e55ab82c5c336e74154fceca70baf49f9b84ce6beb2df0b2375bf3d74bcdb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for implicit-0.6.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 429e0e3376fced00e47e7f776d1dcce61778226c614ffb6df7576aab1bdd1170
MD5 9ad4b827e2e11c6c221289fb3d7cdead
BLAKE2b-256 3f0b651bd8809f0c75f43e5362d75f692d9e008118dc4ca8efa5a582e36ea7cf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for implicit-0.6.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 6e85c3adcae99268a5a05ec53b2f78a4bd7d1ec8e628b44569297e539183254b
MD5 d68cf32a3e32caa0e1437cffb93a38ef
BLAKE2b-256 d25f68238c394085983632f11b911a7375caf1523d565567cb21c045241ebf33

See more details on using hashes here.

File details

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

File metadata

  • Download URL: implicit-0.6.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 642.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.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 2391bffabd476c154dcf304ae664e08084833f43e8a44bdb7f62daca49225f2f
MD5 b9144a6e312a91bbfbf5955e163feb6d
BLAKE2b-256 aadd01b917e9d878986d35366c3e6177696ba8558743ec7f897f25bde41f338a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for implicit-0.6.0-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 904cd4ce3fa70c5fe737c3b08c12040aee0996d2c74192ef49656cb5718792de
MD5 19e4f6915e54b32f0b7ec9cc4d9ebc95
BLAKE2b-256 bcf99f8133a1880ff4393b05e51cee5ff0fa9a44a35b8476a82d11f1da71e917

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for implicit-0.6.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ecef118002aed8027a0f0787855f20bbddb7d7504c96d35fa75145259e241c6e
MD5 8dd32ea1bb8519a9c78bed403100afa9
BLAKE2b-256 888c13ec48846eb9b7901a2957841f8d5a0efa4aa9306c1e6a30af9687c20175

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for implicit-0.6.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 299303594d08921d776a1db802b1056982385ce5c516c5b192a323bbaaecdca3
MD5 27ed4f11d2411a8ed88e8f92e24471dc
BLAKE2b-256 ffe771740f083698b3250a5ae322db7cb199be11fec5b2ad9d06d7a3f0f03477

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for implicit-0.6.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 776d2b8d433580d6f3cbd9ef0465c7001cbadce937d8c6a851f972e13caac1a2
MD5 d03070d4ae8492f0e1274d15f104ba99
BLAKE2b-256 00e91fa6e8f3157229e4a11556d4d966c81f7f484d5e2fe9032239a507f8f3fd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: implicit-0.6.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 642.8 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.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 6ffd2368368fad54a18f2fa7c3357118f62c9926051ef7ff8e5541471d643c77
MD5 f74d5824dcae34153122b73d2849afbc
BLAKE2b-256 1b95e6957e7d414c97c21f7b874b02c3c29076fa7dd9d3510e030a5f1e47e403

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for implicit-0.6.0-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8ad6ba1edb4e5417b7f388e0a4e3ad1850f953339c31731b8b6db650de5e3777
MD5 fe8f29d22f55802d748af5ee0308c1b0
BLAKE2b-256 4a6aed40b55eb3ce8ee1e457a74204784212133dbd3f0fca1806f5d31788b6d8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for implicit-0.6.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 01d2ac33fce1dbc040b39a3051e1f4273c4920960d83316b95b2ce478e2a189c
MD5 e7c4ff3ae0509032b2dd40192e6c2373
BLAKE2b-256 7137349ee512822585aa12b8254f56f1d368406fe1b5084659b737a48b7c0dc4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for implicit-0.6.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 af26877bc35a8d00363eca2b8eac950db851b86215284d7887629ec62b1db93c
MD5 87588e1cbae9ebf50879d3cd802a1b19
BLAKE2b-256 67df5e8dfc34456e67c40ae36bf7dd3e80c4e63078c9a39ec4483e9b99f3e6b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for implicit-0.6.0-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 0c9cd7f807dc6628725c4bd9666f3149a8351cc000e7cf651fe1aa50e130f24d
MD5 06b4ee55c0a70fa5cf85947cf2d9aafb
BLAKE2b-256 14f62f76647130b9cbe8b2a044d643cb7aff2da7d40369f37c82c99030f688f7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: implicit-0.6.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 630.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.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 6de55e8b4f0679dba43fb87f758cc5cc64408a053793a66605198eaef4db2079
MD5 19bab30bd8e02a1807e94073efa33712
BLAKE2b-256 9daf4b2222f77d206994a48029664bacf1f91241e65b9c7e8b529461ec5a186b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for implicit-0.6.0-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c820865ef75d44c7601f4fca8da4132fd87c787fa41b3c55e08c63693c9819d8
MD5 b88eeea8e2da4df1f9654ffbb0648650
BLAKE2b-256 d8a839e2840c459a38471fbc10965a38a8c8970728448d9614c7a76d9ce27570

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for implicit-0.6.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 960924570a2cf881370c480b341dc657e7b3969e808ed82a82915853ba861e27
MD5 6e62e854bb5085c3be0d06d1b611d16b
BLAKE2b-256 4772b0c868ca4090e34ca5ffe7d9d6f128221b68bc953c028324559c72536117

See more details on using hashes here.

File details

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

File metadata

  • Download URL: implicit-0.6.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 630.0 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.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 e470f428a95438b2093717dfbaa561a034045a9489a748de718008e5da1e1cd4
MD5 c44d2b1f531b63b7025ffa938f2ad30c
BLAKE2b-256 df0760d7d486625bbc10c5061a515f3cbd9c41fddcdbff703f30553463848d0a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for implicit-0.6.0-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6ac4e78a7b4b7775785f4a6ed0d0915eaf05b629508bc7b683175d2c43cc34a0
MD5 4a4450791d89a608fbde18551c7f5c16
BLAKE2b-256 df7f0128597a31e5b122b3f7360bb52099e271e0d8309aff82f34c2603c1fa97

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for implicit-0.6.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e4c45116ab72b44e95154b0daa336b2933f24189dc1456a8b18930fa41baef09
MD5 75393b1b1263ac3ce822c21d0daafa0e
BLAKE2b-256 c63ce7ba5a0bd20c81a1d34b7d8527b07ec6f33d7a13a9988e92727363955581

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