Scoring Models#

Most recommendation pipelines are built around a scoring model that scores items for a recommendation query (e.g., user). Standard top-N recommendation uses these scores to rank items, and they can be used as inputs into other techniques such as samplers and rerankers. Scorers are almost always Trainable, and by convention are named XYZScorer. They typically take two inputs, the query (query) and the list of items to score (items).

Scoring models are not limited to traditional pointwise scoring models such as matrix factorization. Many learning-to-rank models are also implemented as scorers, but using a model optimized with a rank-based loss function.

Baseline Scorers#

lenskit.basic.BiasScorer

A user-item bias rating prediction model.

lenskit.basic.PopScorer

Score items by their popularity.

Classical Collaborative Filters#

lenskit.knn.ItemKNNScorer

Item-item nearest-neighbor collaborative filtering feedback.

lenskit.knn.UserKNNScorer

User-user nearest-neighbor collaborative filtering with ratings.

lenskit.als.BiasedMFScorer

Biased matrix factorization trained with alternating least squares [ZWSP08].

lenskit.als.ImplicitMFScorer

Implicit matrix factorization trained with alternating least squares [HKV08].

lenskit.sklearn.svd.BiasedSVDScorer

Biased matrix factorization for explicit feedback using SciKit-Learn's TruncatedSVD.

lenskit.funksvd.FunkSVDScorer

FunkSVD explicit-feedback matrix factoriation.

lenskit.hpf.HPFScorer

Hierarchical Poisson factorization, provided by hpfrec.

Utility Scorers#

These scorers are used to compose more sophisticated pipelines, usually involving multiple pipelines.

lenskit.basic.FallbackScorer

Scoring component that fills in missing scores using a fallback.