tp_metric

Single-run true positive count metric.

class pysatl_cpd.analysis.metrics.single_run.classification.tp_metric.TruePositiveCount(error_margin)[source]

Bases: ClassificationPrimitive, Generic

Count true change points that have at least one matched detection.

Parameters:

error_margin (tuple[int, int])

evaluate(run)[source]

Count true change points that have at least one matched detection.

Parameters:

run (SingleRun[TypeVar(TraceT, bound= DetectionTrace), TypeVar(ProviderT, bound= LabeledData)]) – A single detection run with trace and labeled provider.

Returns:

The true positive count.

Return type:

int