changepoint-doctor#
A Rust-first change-point detection toolkit with Python bindings and a recommendation engine.
changepoint-doctor provides fast offline (batch) segmentation and online (streaming) change detection, backed by a Rust core for performance and a Python API for ease of use. The doctor recommendation engine helps choose good detector pipelines for your data.
pip install changepoint-doctor
import numpy as np
import cpd
x = np.concatenate([np.zeros(50), np.full(50, 5.0), np.full(50, -2.0)])
result = cpd.Pelt(model="l2").fit(x).predict(n_bkps=2)
print(result.breakpoints) # [50, 100, 150]
Install from PyPI or build from source. Run your first change-point detection in 5 minutes.
Algorithms, cost models, the doctor engine, preprocessing, and real-world use cases.
Complete Python API: detectors, result types, diagnostics, and the detect_offline() function.
Rust crate hierarchy, core traits, feature flags, and Rust-side usage examples.
Bibliography#
Rebecca Killick, Paul Fearnhead, and Idris A. Eckley. Optimal detection of changepoints with a linear computational cost. Journal of the American Statistical Association, 107(500):1590–1598, 2012. doi:10.1080/01621459.2012.737745.
A. J. Scott and M. Knott. A cluster analysis method for grouping means in the analysis of variance. Biometrics, 30(3):507–512, 1974. doi:10.2307/2529204.
Robert Maidstone, Toby Hocking, Guillem Rigaill, and Paul Fearnhead. On optimal multiple changepoint algorithms for large data. Statistics and Computing, 27(2):519–533, 2017. doi:10.1007/s11222-016-9636-3.
Piotr Fryzlewicz. Wild binary segmentation for multiple change-point detection. The Annals of Statistics, 42(6):2243–2281, 2014. doi:10.1214/14-AOS1245.
Zaïd Harchaoui and Olivier Cappé. Retrospective mutiple change-point estimation with kernels. In IEEE/SP 14th Workshop on Statistical Signal Processing, 768–772. 2007. doi:10.1109/SSP.2007.4301363.
Yunus Saatci, Ryan D. Turner, and Carl E. Rasmussen. Gaussian Process Change Point Models. PhD thesis, University of Cambridge, 2010. Presented at ICML 2010.
Gideon Schwarz. Estimating the dimension of a model. The Annals of Statistics, 6(2):461–464, 1978. doi:10.1214/aos/1176344136.
Hirotugu Akaike. A new look at the statistical model identification. IEEE Transactions on Automatic Control, 19(6):716–723, 1974. doi:10.1109/TAC.1974.1100705.
Ryan P. Adams and David J. C. MacKay. Bayesian online changepoint detection. arXiv preprint arXiv:0710.3742, 2007.
E. S. Page. Continuous inspection schemes. Biometrika, 41(1/2):100–115, 1954. doi:10.2307/2333009.