Skip to main content

Recommender systems for Python

Project description

A Python Recommender Systems library

Installation

I have only tested on Python 3.5.1

pip3 install pyrecs

Usage

Given a NUM_USERS x NUM_ITEMS matrix of ratings, predict the rating by user 0 of item 2 and by user 2 of item 0:

>>> cf = pyrecs.collab.CollaborativeFiltering()
>>> cf.fit([[10,     3.4, np.nan, None],
...         [10,     0,   10,     5],
...         [np.nan, 1.4, 10,     3],
...         [np.nan, 8,   2,      5]])
>>> cf.predict([(0, 2), (2, 0)])
array([ 10.68567893,   8.31302514])

Tests

py.test tests

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

PyRecs-0.11.tar.gz (2.1 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