← all repositories
NicolasHug/Surprise

The recommender scikit that shows its work

Surprise bundles classical collaborative-filtering algorithms and rigorous evaluation tools for Python developers working with explicit ratings.

6.8k stars Python ML FrameworksOther AI
Surprise
Not currently ranked — collecting fresh signals.
star history

What it does

Surprise is a Python scikit for building and analyzing recommender systems that handle explicit rating data. It bundles classical collaborative-filtering algorithms—SVD, SVD++, NMF, k-NN variants, Slope One, and baselines—along with built-in similarity measures like cosine and Pearson. The library also provides dataset loaders for Movielens and Jester, plus cross-validation and grid-search utilities that echo scikit-learn’s API.

The interesting bit

The README publishes exhaustive benchmark tables comparing RMSE, MAE, and runtime across every algorithm on standard Movielens datasets, all run on the same laptop with identical folds—an unusual level of reproducibility detail for a library landing page. The documentation also attempts to expose every algorithmic detail rather than hiding them behind abstraction.

Key highlights

  • Matrix factorization (SVD, SVD++, NMF), neighborhood methods, and baseline algorithms in one toolkit
  • Built-in CV iterators and GridSearchCV inspired by scikit-learn
  • Ready-to-load Movielens and Jester datasets, plus support for custom data formats
  • Published in JOSS (2020) with a citable DOI
  • BSD 3-Clause license, suitable for commercial use

Caveats

  • Explicit ratings only: the README clearly states it does not support implicit ratings or content-based information
  • SVD++ can be slow: benchmarks show roughly 41 minutes on Movielens 1M versus about one minute for standard SVD

Verdict

A solid choice for researchers and practitioners who need classical collaborative filtering with rigorous evaluation and reproducible benchmarks. Skip it if your data is implicit or if you need content-based features.

Frequently asked

What is NicolasHug/Surprise?
Surprise bundles classical collaborative-filtering algorithms and rigorous evaluation tools for Python developers working with explicit ratings.
Is Surprise open source?
Yes — NicolasHug/Surprise is open source, released under the BSD-3-Clause license.
What language is Surprise written in?
NicolasHug/Surprise is primarily written in Python.
How popular is Surprise?
NicolasHug/Surprise has 6.8k stars on GitHub.
Where can I find Surprise?
NicolasHug/Surprise is on GitHub at https://github.com/NicolasHug/Surprise.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.