Metrics and Analysis#

Base Interfaces#

Metric

Base class for LensKit metrics.

ListMetric

Base class for metrics that measure individual recommendation (or prediction) lists, and whose results may be aggregated to compute overall metrics.

GlobalMetric

Base class for metrics that measure entire runs at a time.

MetricFunction

Interface for per-list metrics implemented as simple functions.

RankingMetricBase

Base class for most ranking metrics, implementing a k parameter for truncation.

Bulk Analysis#

RunAnalysis

Compute metrics over a collection of item lists composing a run.

RunAnalysisResult

Results of a bulk metric computation.

Basic Statistics#

ListLength

Report the length of the output (recommendation list or predictions).

TestItemCount

Report the number of test items.

Top-N Accuracy#

NDCG

Compute the normalized discounted cumulative gain [JarvelinKekalainen02].

RBP

Evaluate recommendations with rank-biased precision [MZ08] with a patience parameter \(\gamma\).

Precision

Compute recommendation precision.

Recall

Compute recommendation recall.

RecipRank

Compute the reciprocal rank [KV97] of the first relevant item in a list of recommendations.

List and Item Properties#

MeanPopRank

Compute the _obscurity_ (mean popularity rank) of the recommendations.

Prediction Accuracy#

RMSE

Compute RMSE (root mean squared error).

MAE

Compute MAE (mean absolute error).