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.

Files for PyRecs, version 0.11
Filename, size File type Python version Upload date Hashes
Filename, size PyRecs-0.11.tar.gz (2.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page