Materials and methods
The BOCPD algorithm (Adams and MacKay 2007) is based on sequential Bayesian posterior estimation of the length of the current regime (run length) and the regime-specific parameters of the underlying predictive model (mean and variance). The recursion for calculating the posterior distribution of the run length\(r_{t}\) at time \(t\) given the observations\(y_{1:t}=(y_{1},...,y_{t})\) is