recall

Micro-averaged recall over multiple runs.

class pysatl_cpd.analysis.metrics.multiple_run.classification.recall.RecallMetric(error_margin)[source]

Bases: DerivedMetric[TraceT, ProviderT, Number, float], Generic

Configure the recall metric with an error margin.

Parameters:

error_margin (tuple[int, int]) – Allowed (left, right) margin around each true change point for matching detections.

__init__(error_margin)[source]
Parameters:

error_margin (tuple[int, int])

Return type:

None

property bases: Mapping[str, IMultipleRunMetric[TraceT, ProviderT, int]]

Underlying TP and FN metrics.

Return type:

Mapping[str, IMultipleRunMetric]

compute(values)[source]

Compute recall as TP / (TP + FN).

Parameters:

values (Mapping[str, double | int | float]) – Must contain tp and fn keys.

Returns:

The recall score. Returns 0.0 when TP + FN is zero.

Return type:

float