lenskit.metrics.bulk.RunAnalysis#

class lenskit.metrics.bulk.RunAnalysis(*metrics)#

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

This class now uses MetricAccumulator internally to separate accumulation from looping, while maintaining the same external interface.

Changed in version 2026.1: Global metric outputs from this class have changed column names in some cases, to simplify logic.

Deprecated since version 2026.1: This class is deprecated in favor of directly using MeasurementCollector.

Parameters:

metrics (lenskit.metrics._base.Metric) – A list of metrics; you can also add them with add_metric(), which provides more flexibility.

Stability:
Caller (see Stability Levels).
collector: lenskit.metrics.MeasurementCollector#

The measurement collector for this analysis.

add_metric(metric, label=None, default=None)#

Add a metric to this metric set.

Parameters:
compute(outputs, test)#

Deprecated alias for measure().

Deprecated since version 2025.1.1: Use measure() instead.

Parameters:
Return type:

RunAnalysisResult

measure(outputs, test)#

Measure a set of outputs against a set of test data.

Parameters:
Return type:

RunAnalysisResult