page_cusum

Page two-sided CUSUM change-point detection algorithm.

This module provides PageTwoSidedCusum, an online detector based on the two-sided Page CUSUM statistic for Gaussian observations.

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

Bases: GeneralizedCUSUMConfiguration

Configuration parameters for the Page two-sided CUSUM algorithm.

Variables:
  • delta – Sensitivity/reference parameter for the Page 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.page_cusum.PageTwoSidedCusumState(*, is_in_learning_period=False, statistics)[source]

Bases: GeneralizedCUSUMState[EstimatesGaussianMLE]

State snapshot of the Page two-sided CUSUM algorithm.

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

None

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

Bases: GeneralizedCUSUM[MultivariateNumericArray, PageTwoSidedCusumConfiguration, PageTwoSidedCusumState, EstimatesGaussianMLE, UnivariateNumericArray]

Two-sided Page CUSUM detector for Gaussian observations.

This algorithm maintains running estimates of mean and covariance, computes whitened residuals, and tracks a two-sided Page CUSUM statistic.

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

  • delta (float) – Sensitivity/reference 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: PageTwoSidedCusumConfiguration

Return the algorithm configuration.

property state: PageTwoSidedCusumState

Return the algorithm configuration.

__repr__()[source]

Return a string representation of the algorithm with its configuration.

Return type:

str