Welcome to bayesloop’s documentation!

Probabilistic programming framework that facilitates objective model selection for time-varying parameter models.
The tutorials and examples in this documentation can be run directly in the browser. Selecting the run button on a code cell starts a Python session in which the code of that page can be executed and freely modified, without a local installation.
See also
If you want to contribute to the project or just browse the source code, visit the Github repository of bayesloop.
Contents
- Installation
- Migrating from bayesloop 1.x
- Tutorials
- Examples
- Anomalous diffusion
- Stock market fluctuations
- Measles in the United States: abrupt break or gradual decline
- The rate of great earthquakes over time
- Atlantic hurricanes: a shift in activity in the 1990s
- The Great Moderation: dating a fall in US growth volatility
- A century of baseball: dating the home-run regime shifts
- The data
- Modelling the rate: a Gaussian with inferred scatter
- A smooth time-varying rate over the full history
- Letting the evidence choose: constant, gradual, or one break
- Isolating the steroid-era onset
- Quantifying the regimes from the raw series
- The home run as one time-varying parameter
- The two dated breaks
- What this example showed
- Sunspots: the 20th-century “Grand Maximum”
- Real-time seizure detection from EEG
- Online COVID-19 forecasting with a time-varying growth rate
- Real-time S&P 500 volatility: bayesloop versus GARCH
- The data
- The observation model: zero-mean white noise with time-varying volatility
- The online model: real-time selection between calm and turbulent dynamics
- The constant-volatility baseline
- The benchmark: GARCH(1,1)
- Validation: forecasts, realized volatility, and shock dates
- The scoreboard
- Figure 1: the regime signal in context
- Figure 2: the out-of-sample race and the volatility paths
- What this example showed
- Weather-adjusted electricity demand and the COVID shock
- Animal movement: a continuum the HMM cannot represent
- API Reference