Drift and change points
detect_changes(values; method=:auto)
detect_drift(values; kind=:auto):auto inspects sample size, tail weight, missingness, cadence, and control presence, then reports the chosen method and why.
| Method | Role |
|---|---|
:cusum | Page CUSUM (Page, 1954) |
:likelihood | Gaussian mean-change LR / SIC |
:pelt | PELT piecewise mean (Killick et al., 2012) |
:robust_median | MAD-standardized CUSUM |
:rolling | Welch window scan |
:bayesian | Fearnhead product-partition posterior (multiple changes) (Fearnhead, 2006) |
:turing | Optional Turing.jl MCMC (sampler=:mh or :nuts; model=:multiple with ncuts) |
:kernel | Energy-distance scan (Székely and Rizzo, 2013) |
Drift kinds: linear (Theil–Sen), sudden, variance (Inclán–Tiao (Inclán and Tiao, 1994)), cyclic (periodogram), distributional (KS), nonlinear (quadratic vs linear).
Results are DriftResult / ChangePointResult structs, not booleans.
Multivariate matrices use Mahalanobis, PCA Hotelling T², covariance Frobenius shift, or energy distance.