crosier_cusum

Crosier CUSUM change-point detection algorithm.

This module provides CrosierCusum, an online detector based on the Crosier CUSUM statistic with norm-based shrinkage for Gaussian observations.

class pysatl_cpd.algorithms.online.cusum.algorithm.crosier_cusum.CrosierCusumConfiguration(*, learning_period_size=0, adaptive_estimation=True, delta=0.0, cov_reg=1e-06)[source]

Bases: GeneralizedCUSUMConfiguration

Configuration parameters for the Crosier CUSUM algorithm.

Variables:
  • delta – Shrinkage/sensitivity parameter for the Crosier change-point function.

  • cov_reg – Covariance regularization coefficient used in monitoring.

  • adaptive_estimation – Whether Gaussian parameter estimation is adaptive.

Parameters:
  • learning_period_size (int)

  • adaptive_estimation (bool)

  • delta (float)

  • cov_reg (float)

delta: float = 0.0
cov_reg: float = 1e-06
adaptive_estimation: bool = True
__post_init__()[source]

Validate configuration parameters.

Raises:

ValueError – If learning_period_size is non-positive or cov_reg is non-positive.

Return type:

None

__repr__()[source]

Return a short string representation of the configuration.

Return type:

str

__init__(*, learning_period_size=0, adaptive_estimation=True, delta=0.0, cov_reg=1e-06)
Parameters:
  • learning_period_size (int)

  • adaptive_estimation (bool)

  • delta (float)

  • cov_reg (float)

Return type:

None

class pysatl_cpd.algorithms.online.cusum.algorithm.crosier_cusum.CrosierCusumState(*, is_in_learning_period=False, statistics)[source]

Bases: GeneralizedCUSUMState[EstimatesGaussianMLE]

State snapshot of the Crosier CUSUM algorithm.

Parameters:
__init__(*, is_in_learning_period=False, statistics)
Parameters:
Return type:

None

class pysatl_cpd.algorithms.online.cusum.algorithm.crosier_cusum.CrosierCusum(learning_period_size, delta=0.0, cov_reg=1e-06, adaptive_estimation=True)[source]

Bases: GeneralizedCUSUM[MultivariateNumericArray, CrosierCusumConfiguration, CrosierCusumState, EstimatesGaussianMLE, UnivariateNumericArray]

Crosier CUSUM detector for Gaussian observations.

This algorithm maintains running estimates of mean and covariance, computes whitened residuals, and tracks a Crosier-style CUSUM statistic with norm-based shrinkage.

Parameters:
  • learning_period_size (int) – Number of initial observations used for parameter learning.

  • delta (float) – Shrinkage/sensitivity parameter. Default is 0.0.

  • cov_reg (float) – Covariance regularization. Default is 1e-6.

  • adaptive_estimation (bool) – Whether to update estimates online. Default is True.

__init__(learning_period_size, delta=0.0, cov_reg=1e-06, adaptive_estimation=True)[source]
Parameters:
  • learning_period_size (int)

  • delta (float)

  • cov_reg (float)

  • adaptive_estimation (bool)

Return type:

None

property name: str

Return the algorithm name.

property configuration: CrosierCusumConfiguration

Return the algorithm configuration.

property state: CrosierCusumState

Return the algorithm state.

__repr__()[source]

Return a string representation of the algorithm with its configuration.

Return type:

str