Skip to main content

Collaborative Filtering for Implicit Datasets

Project description

Implicit
========

Fast Python Collaborative Filtering for Implicit Datasets.

----

This project provides a fast Python implementation of the algorithm decribed in the paper '`Collaborative Filtering for Implicit Feedback Datasets
<http://yifanhu.net/PUB/cf.pdf>`_'.

To install ::

pip install implicit

Basic usage ::

import implicit
user_factors, item_factors = implicit.alternating_least_squares(data, factors=50)

Requirements
----

This library requires SciPy version 0.16 or later.

Why Use This?
----

This library came about because I was looking for an efficient Python
implementation of this algorithm for a blog post I am writing.

The other `pure python implementation
<https://github.com/MrChrisJohnson/implicit-mf>`_ was much too slow on the
dataset I'm interested in: this package finishes factorizing the last.fm
dataset in about 10 minutes (50 factors, 15 iterations, 2015
macbook pro) where I estimate that the implicit-mf package would take 250 days
or so to do the same computation.

The core of this package is written in Cython, leveraging OpenMP to
parallelize computation. Linear Algebra is done using the BLAS and LAPACK
libraries distributed with SciPy. There also exists a pure python
implementation as a reference.

This library has been tested with Python 2.7 and 3.5. Running 'tox' will
run unittests on both versions, and verify that all python files pass flake8.

TODO
----

This is still a work in progress. Things immediately on the horizon:

- Example application
- Sphinx autodoc
- Test on linux, verify openmp support actually works
- Benchmark

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 Distribution

implicit-0.1.0.tar.gz (4.7 kB view hashes)

Uploaded Source

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