online_detector
Online change-point detector interface.
- class pysatl_cpd.core.online.detectors.online_detector.OnlineDetector(algorithm, *, data_transformer=None)[source]
Bases:
ChangePointDetector,ABC,GenericOnline detector that owns an online algorithm and returns an online trace.
- Parameters:
algorithm (
OnlineAlgorithm[TypeVar(DataT),TypeVar(ConfigurationT, bound=OnlineAlgorithmConfiguration),TypeVar(StateT, bound=OnlineAlgorithmState)]) – Algorithm instance that drives the per-step detection.data_transformer (
Optional[IDataTransformer[Any,Any]]) – Optional transformer applied to incoming data before processing.
- Variables:
algorithm – Algorithm instance that drives the per-step detection.
- __init__(algorithm, *, data_transformer=None)[source]
- Parameters:
algorithm (OnlineAlgorithm[DataT, ConfigurationT, StateT])
data_transformer (IDataTransformer[Any, Any] | None)
- Return type:
None
- algorithm: OnlineAlgorithm
- detect(data)[source]
Run the online pipeline over the provider and return a full online trace.
- Parameters:
data (
DataProvider[TypeVar(DataT),TypeVar(AnnotationT, bound=TimeseriesAnnotation)]) – Source of observations to process sequentially.- Returns:
Trace containing per-step detection results and metadata.
- Return type:
OnlineDetectionTrace[TypeVar(StateT, bound=OnlineAlgorithmState)]
- abstractmethod clone()[source]
Create an independent detector instance with the same configuration.
- Returns:
A new detector instance with identical configuration.
- Return type:
Self- Raises:
NotImplementedError – Subclasses must implement this method.