gaussian_ar

Gaussian autoregressive estimating schema.

class pysatl_cpd.algorithms.online.cusum.component.estimator.gaussian_ar.EstimatesGaussianAR[source]

Bases: ISchemaEstimates

intercept: float
coefficients: UnivariateNumericArray
noise_variance: float
history: UnivariateNumericArray
class pysatl_cpd.algorithms.online.cusum.component.estimator.gaussian_ar.GaussianARSchema(autoreg_order=1, adaptive=True, window=None)[source]

Bases: IEstimatingSchema[UnivariateNumericArray, EstimatesGaussianAR]

Univariate autoregressive estimation schema backed by arch ARX.

Parameters:
  • autoreg_order (int) – Number of lags in the AR model (> 0).

  • adaptive (bool) – Whether to re-fit the model online after training.

  • window (int | None) – Maximum number of observations retained for fitting. None means unbounded.

Raises:
  • ValueError – If autoreg_order is non-positive, or window is non-positive.

  • RuntimeError – If the optional arch dependency is not installed.

__init__(autoreg_order=1, adaptive=True, window=None)[source]
Parameters:
  • autoreg_order (int)

  • adaptive (bool)

  • window (int | None)

Return type:

None

train(train_set)[source]

Fit AR model parameters from a training sample.

Parameters:

train_set (Sequence[ndarray[tuple[int], dtype[double]]]) – Training observations.

Return type:

None

update(observation)[source]

Update the internal data buffer and optionally re-fit AR weights.

Parameters:

observation (ndarray[tuple[int], dtype[double]]) – New observation.

Return type:

None

property estimates: EstimatesGaussianAR

Current AR model estimates.

Return type:

EstimatesGaussianAR

reset()[source]

Reset all AR parameters and data buffer.

Return type:

None