hildensia/bayesian_changepoint_detection
Methods to get the probability of a changepoint in a time series.
What it solves
This library provides a way to detect "changepoints"—sudden shifts in the underlying statistical properties of time series data—using Bayesian inference. It allows users to identify when the behavior of a data stream changes, whether in real-time (online) or after the data has been collected (offline).
How it works
The project implements Bayesian changepoint detection algorithms based on the concept of "run length" (the time since the last change). It calculates the probability distribution over these run lengths given the observed data. It uses a hazard function to define the prior probability of a change occurring and a likelihood model (such as Student's t-distributions) to determine how well the data fits the current segment.
Who it’s for
It is designed for researchers and data scientists working with univariate or multivariate time series data who need a high-performance implementation of Bayesian changepoint detection.
Highlights
- PyTorch Backend: Uses PyTorch for automatic differentiation and vectorized operations.
- GPU Acceleration: Supports CUDA and Apple Silicon (MPS) for 10-100x speedups on large datasets.
- Online and Offline Modes: Supports both sequential detection for streaming data and batch processing for historical data.
- Flexible Distributions: Includes support for univariate and multivariate Student's t-distributions.
- Customizable Priors: Offers constant, geometric, and negative binomial prior distributions.
Related
- Project
- Project
- Project
- Project