lenskit.metrics.ListLength#

class lenskit.metrics.ListLength#

Bases: ListMetric

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

Stability:
Caller (see Stability Levels).
__init__()#

Methods

__init__()

extract_list_metrics(data, /)

Return the given per-list metric result.

measure_list(recs, test)

Compute the metric value for a single result list.

summarize(values)

Summarize per-list metric values

Attributes

default

label

measure_list(recs, test)#

Compute the metric value for a single result list.

Individual metric classes need to implement this method.

Parameters:
Return type:

float

summarize(values)#

Summarize per-list metric values

Returns:

A dictionary containing mean, median, and std.