autoregressive_cusum
Autoregressive CUSUM change-point detection algorithm.
- class pysatl_cpd.algorithms.online.cusum.algorithm.autoregressive_cusum.AutoregressiveCusumConfiguration(*, learning_period_size=0, adaptive_estimation=True, delta=0.0, autoreg_order=1, autoreg_window=None)[source]
Bases:
GeneralizedCUSUMConfigurationConfiguration for the autoregressive CUSUM algorithm.
- Variables:
delta – Sensitivity parameter for the Page change-point function.
autoreg_order – Number of AR lags (> 0).
autoreg_window – Maximum observations retained for AR fitting (must exceed autoreg_order when provided).
- Parameters:
- __post_init__()[source]
Validate configuration after initialisation.
- Raises:
ValueError – If learning_period_size is non-positive, autoreg_order is non-positive, learning_period_size is too small, or autoreg_window is too small.
- Return type:
- class pysatl_cpd.algorithms.online.cusum.algorithm.autoregressive_cusum.AutoregressiveCusumState(*, is_in_learning_period=False, statistics)[source]
Bases:
GeneralizedCUSUMState[EstimatesGaussianAR]State snapshot of the autoregressive CUSUM algorithm.
- Parameters:
is_in_learning_period (bool)
statistics (ISchemaEstimates)
- __init__(*, is_in_learning_period=False, statistics)
- Parameters:
is_in_learning_period (bool)
statistics (ISchemaEstimates)
- Return type:
None
- class pysatl_cpd.algorithms.online.cusum.algorithm.autoregressive_cusum.AutoregressiveCUSUM(learning_period_size, delta, autoreg_order=1, autoreg_window=None, adaptive_estimation=True)[source]
Bases:
GeneralizedCUSUM[UnivariateNumericArray,AutoregressiveCusumConfiguration,AutoregressiveCusumState,EstimatesGaussianAR,UnivariateNumericArray]CUSUM detector for univariate autoregressive Gaussian time series.
- Parameters:
learning_period_size (
int) – Number of initial training observations.delta (
float) – Sensitivity parameter for the Page CUSUM statistic.autoreg_order (
int) – Number of AR lags (> 0).autoreg_window (
int|None) – Max observations for AR fitting (None= unbounded).adaptive_estimation (
bool) – Whether to re-fit AR coefficients online after training.
- __init__(learning_period_size, delta, autoreg_order=1, autoreg_window=None, adaptive_estimation=True)[source]
- property configuration: AutoregressiveCusumConfiguration
Current algorithm configuration.
- Return type:
- property state: AutoregressiveCusumState
Materialise an immutable state snapshot.
- Return type: