canari.component.bounded_autoregression_component#
- class canari.component.bounded_autoregression_component.BoundedAutoregression(std_error: float, phi: float, gamma: float | None = None, mu_states: list[float] | None = None, var_states: list[float] | None = None)[source]#
Bases:
BaseComponent
BoundedAutoregression class, inheriting from Canari’s BaseComponent. It models residuals following a univariate AR(1) process with optional constrains defined by a coefficient (gamma), which scales the standard deviation of the stationary AR.
- Parameters:
std_error ([float]) – Known standard deviation of the process noise.
phi ([float]) – Known autoregressive coefficient.
gamma (Optional[float]) – Coefficient to scale the standard deviation of the stationary AR. If none, no constraint is applied.
mu_states (Optional[list[float]]) – Initial mean of the hidden state. Defaults: initialized to zeros.
var_states (Optional[list[float]]) – Initial variance of the hidden state. Defaults: initialized to zeros.
- Behavior:
Adds 1 extra state, i.e. X^{BAR}, if gamma is provided. Otherwise no constraint is applied.
References
Xin, Z. and Goulet, J.-A. (2024). Enhancing structural anomaly detection using a bounded autoregressive component. Mechanical Systems and Signal Processing. Volume 212, pp.111279.
Examples
>>> from canari.component import BoundedAutoregression >>> # with gamma >>> bar = BoundedAutoregression(std_error=1, phi=0.75, gamma=0.5) >>> # without gamma >>> bar_1 = BoundedAutoregression(std_error=1, phi=0.75)