About pybocd

What is Bayesian Online Changepoint Detection?

Bayesian Online Changepoint Detection (BOCD) is a statistical method for detecting abrupt changes or “changepoints” in streaming data. Unlike batch methods that require all data upfront, BOCD processes data sequentially and maintains a posterior distribution over possible changepoint locations.

Why Use pybocd?

Key Features

  • Sequential Processing: Process infinite data streams with bounded memory
  • Real-time Inference: Get posterior run-length estimates at each time step
  • Multiple Models: Choose between NIG (fast, conjugate) and GMM (flexible, multimodal)
  • Pure Python: Easy to install and integrate into Python workflows
  • Efficient Implementations: Optimized for performance with NumPy/SciPy

Applications

BOCD has applications in numerous domains:

  • Network Monitoring: Detect anomalies and performance degradation
  • Financial Markets: Identify regime changes and volatility shifts
  • Sensor Networks: Monitor equipment for faults and failures
  • Time Series Analysis: Structural break detection and segmentation
  • Quality Control: Track process changes in manufacturing
  • Anomaly Detection: Identify unusual behavior patterns in streams

Project Information

Acknowledgments

During development, real-world data sourced from Westermo is used, which is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0). We gratefully acknowledge Westermo for making this telemetry data available for research and development.