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.

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.

Prediction Accuracy#

RMSE

Compute RMSE (root mean squared error).

MAE

Compute MAE (mean absolute error).