nochange
No-change policy for no-reset ARL evaluation.
- class pysatl_cpd.benchmark.online.noreset.metrics.policy.nochange.NoChangePolicy(*, strict=True)[source]
Bases:
GenericPolicy that marks only the first qualifying detection for ARL evaluation.
- Parameters:
strict (
bool) – Whether to use strict inequality when comparing detection function values against the threshold (default True).
- apply(run, threshold)[source]
Apply the policy and keep only the first qualifying detection.
Validates the run as a no-change run, finds all points where the detection function exceeds the threshold, and retains at most the first such point.
- Parameters:
run (
SingleRun[OnlineDetectionTrace[TypeVar(StateT, bound=OnlineAlgorithmState)],TypeVar(ProviderT, bound=LabeledData[Any,Any])]) – Input run with anOnlineDetectionTraceand labeled data.threshold (
float) – Threshold applied to the detection function values.
- Returns:
Run wrapping a no-reset trace with at most one detection point.
- Return type:
SingleRun[NoResetDetectionTrace[TypeVar(StateT, bound=OnlineAlgorithmState)],TypeVar(ProviderT, bound=LabeledData[Any,Any])]