base
Base classes for single-run classification metrics.
- class pysatl_cpd.analysis.metrics.single_run.classification.base.ClassificationMetricBase(error_margin)[source]
Bases:
ISingleRunMetric,GenericBase class for single-run metrics built on change-point matching.
- Parameters:
error_margin (
tuple[int,int]) – Allowed (left, right) margin for matching detections to true CPs.
- match(detected_change_points, true_change_points)[source]
Match detections to true change points using stored margin.
- abstractmethod evaluate(run)[source]
Evaluate the metric for a single run.
- Parameters:
run (
SingleRun[TypeVar(TraceT, bound=DetectionTrace),TypeVar(ProviderT, bound=LabeledData)]) – The run to evaluate.- Return type:
TypeVar(ResultT)
- class pysatl_cpd.analysis.metrics.single_run.classification.base.ClassificationPrimitive(error_margin)[source]
Bases:
ClassificationMetricBase[TraceT,ProviderT,int],GenericBase class for count-based single-run classification metrics.
- abstractmethod evaluate(run)[source]
Evaluate the metric for a single run.
- Parameters:
run (
SingleRun[TypeVar(TraceT, bound=DetectionTrace),TypeVar(ProviderT, bound=LabeledData)]) – The run to evaluate.- Return type: