lenskit.metrics.RankingMetricBase#
- class lenskit.metrics.RankingMetricBase(k=None)#
Bases:
Metric
Base class for most ranking metrics, implementing a
k
parameter for truncation.- Parameters:
k (int | None) – Specify the length cutoff for rankings. Rankings longer than this will be truncated prior to measurement.
Methods
Attributes
The maximum length of rankings to consider.
label
The metric's default label in output.