Skip to main content

An implementation of Embarrassingly Shallow Autoencoders

Project description

EASEy

An implementation of Embarrassingly Shallow Autoencoders (EASE).

EASE is a state-of-the-art prediction model for collaborative filtering on implicit feedback.

When to use EASE and when not to use EASE

EASE consistently performs near the top of recommender system benchmarks (see live benchmark). It outperforms many deep learning and graph-based approaches (see paper).

EASE is best when the number of items is small, because the most computationally complex part of training is taking the inverse of an item x item cooccurrence matrix. The good news is, this complexity is independent of the number of users or interactions.

EASE also doesn't take into account any item or user features like more complex models - it uses interactions only.

Given these two constraints, EASE is a great tool for:

  • Standalone prediction - Raw EASE scores are highly predictive
  • Candidate generation - Limit the item space to a set of relevant candidates per user
  • Feature engineering - EASE scores can be used in downstream models (e.g., a classification GBM)

Installation

EASEy depends on sparse_dot_mkl and numpy. sparse_dot_mkl is used for parallel computation of the gram matrix (X^TX), because the scipy implementation is single-threaded which becomes a bottleneck very quickly.

It is recommended to install sparse_dot_mkl with conda because this ensures that MKL is linked properly. If you use conda, you likely already have MKL installed because numpy is built with MKL by default.

Usage

EASEy is compatible with both pandas and polars DataFrames. Technically it's compatible with any object that has array-like values accessible with index [] syntax, even a basic dict. The EASE class has two public methods - fit and predict - for training and inference respectively.

EASE has only one hyperparameter, lambda, for L2 regularization. In the original paper, values from 200 to 1,000 were found to be optimal. Lower values lead to more long-tail recommendations at the expense of possible overfitting. Higher values lead to recommending more popular items.

See movielens_example.ipynb for a simple training and inference example.

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

easey-0.3.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

easey-0.3.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file easey-0.3.0.tar.gz.

File metadata

  • Download URL: easey-0.3.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for easey-0.3.0.tar.gz
Algorithm Hash digest
SHA256 8697bc820ae58a8621abeb831825f9456464419e1d374b40a021cb89002f3f9d
MD5 9a508e83467d69b0c95b6c8fcdbe02ec
BLAKE2b-256 053e38dd311871254674ebfb7c7da79e80386ab75c48d9e468d82c2d74767b53

See more details on using hashes here.

File details

Details for the file easey-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: easey-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for easey-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cbd14ae69f6e7f9c62a24c03cde8890e2919287f6e5db9f8b50e27206df76f99
MD5 2db33442c3695ec3a19ab652e9fb4009
BLAKE2b-256 37a5ef647d2f5527839007ef992b730daf283a18e8db48deaee7c1b3c3c82e5f

See more details on using hashes here.

Supported by

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