Skchange is an open-source Python library for detecting structural changes in time series. It implements modern change detection algorithms within a unified and extensible framework. The algorithms are modular and composable, and they include changepoint search methods based on both cost minimisation and statistical tests. Key features include the detection of anomalous segments in addition to changepoints; theoretically well-founded fast and approximate search methods; theoretically well-founded algorithms for high-dimensional data, covering settings where either few or many features change simultaneously; utilities for automatic and data-driven penalty calibration, which balances false alarms against missed detections; and a large collection of built-in costs and statistical tests. The design follows established scikit-learn conventions to streamline both user and contributor experience, and Numba is used extensively to achieve high computational performance. Source code and documentation are available at https://github.com/NorskRegnesentral/skchange.
Figures & tables
Figure 1: Three-dimensional toy data with (a) three detected changepoints and (b) two detected segment anomalies as an alternative representation.
Figure 3: Run-time evaluation of comparable algorithms in skchange and ruptures on change-free Gaussian data for the L2 cost (left) and the multivariate rank cost (right). Machine specifications: CPU Intel Xeon Silver 4110 @ 2.10 GHz, 10 cores, 49 GB of RAM.
Federal Institute for Occupational Safety and Health, Dresden · Technical University of Munich, Munich Center for Machine Learning · Sapienza University of Rome