Bayesian Online Changepoint Detection

Implements the Bayesian online changepoint detection method by Adams and MacKay (2007) for univariate or multivariate data. Gaussian and Poisson probability models are implemented. Provides post-processing functions with alternative ways to extract changepoints.

The goal of ocp is to implement Bayesian Online Changepoint Detection, as described:


This is a basic example of how to use the function "onlineCPD" on simulated univariate Gaussian data as input.

truecps<- c(1, 51, 71, 121)
#simulate the data
uvg<- c(rnorm(n=diff(truecps)[1], mean=0, sd=2), 
        rnorm(n=diff(truecps)[2], mean=20, sd=4),
        rnorm(n=diff(truecps)[3], mean=10, sd=3))
ocpd_output<- onlineCPD(uvg) 


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.1.1 by Andrea Pagotto, 2 years ago

Browse source code at

Authors: Andrea Pagotto

Documentation:   PDF Manual  

GPL-3 license

Imports grid, graphics, grDevices

Suggests testthat, knitr, rmarkdown

See at CRAN