base
Base classes and mixins for no-reset benchmark analyzers.
- class pysatl_cpd.benchmark.online.noreset.tooling.analyzers.base.NoResetAnalyzerBase(entries_picker=None)[source]
Bases:
ABCBase class for no-reset benchmark analyzers.
Provides a default
entries_pickerand lazily resolvedregistryproperty shared by all concrete analyzers.- Parameters:
entries_picker (
BenchmarkEntriesPicker|None) – Strategy for selecting registry entries. Defaults toOnlineNoResetEntryAlgorithmPickerwhen not provided.
- __init__(entries_picker=None)[source]
- Parameters:
entries_picker (BenchmarkEntriesPicker | None)
- Return type:
None
- property registry: BenchmarkRegistry[Any, OnlineDetectionTrace[Any]]
Registry of cached detection runs.
- Raises:
ValueError – If the registry has not been set yet.
- pick_runs(benchmark_entry, *, entries_picker=None)[source]
Retrieve runs matching a benchmark entry from the registry.
Uses the supplied or default entries picker to select relevant keys, then fetches the corresponding
SingleRunobjects.- Parameters:
benchmark_entry (
OnlineNoResetBenchmarkEntry) – Entry describing the detector configuration.entries_picker (
BenchmarkEntriesPicker|None) – Override picker for this call; falls back toself.entries_pickerwhen None.
- Returns:
Runs whose keys were selected by the picker.
- Return type:
- class pysatl_cpd.benchmark.online.noreset.tooling.analyzers.base.NoResetBisigementClassificationMixin[source]
Bases:
ABCMixin that provides classification-report access and bisegment validation.
- property classification_report: NoResetClassificationReport[Any, Any]
Classification report containing TP/FP/FN metric definitions.
- Raises:
ValueError – If the report has not been set yet.
- static validate_bisegment_runs(runs, expected_detector)[source]
Verify that every run matches the expected detector and is a valid bisegment.
Checks three conditions: all runs belong to the expected detector, all providers are of
BISEGMENTtype, and each provider has exactly one change point.- Parameters:
runs (
Sequence[SingleRun[OnlineDetectionTrace[Any],LabeledData[Any,TimeseriesAnnotation]]]) – Runs to validate.expected_detector (
ChangePointDetectorDescription) – Detector description that every run must match.
- Raises:
ValueError – If any run fails the validation checks.
- Return type: