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.4.0.tar.gz (3.9 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.4.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: easey-0.4.0.tar.gz
  • Upload date:
  • Size: 3.9 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.4.0.tar.gz
Algorithm Hash digest
SHA256 07cd2231ea715dc8cd5c6d338025058806d1aaec834c50e5898248151a3d826d
MD5 e7e18b631b623c031247c3d83836485c
BLAKE2b-256 e7f5663ee21fd26e1f55ea681120606503e18cf9bbca27fcefbd63dc5a73eb16

See more details on using hashes here.

File details

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

File metadata

  • Download URL: easey-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f6b405de022d708618f127605a146171f07631b1f61aa514ba65acd0ea02940
MD5 a275937bb467a11ac520a6a564a76083
BLAKE2b-256 9c150a83927a962d8a710d093f61addaa018c2a2bfee9dfa6569a685dad905b1

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