Bayesian Context Trees for Discrete Time Series

An implementation of a collection of tools for exact Bayesian inference with discrete times series. This package contains functions that can be used for prediction, model selection, estimation, and other statistical tasks. Specifically, the functions provided can be used for the exact computation of the prior predictive likelihood of the data, for the identification of the a posteriori most likely (MAP) variable-memory Markov models, for calculating the exact posterior probabilities and the AIC and BIC scores of these models, and for prediction with respect to log-loss and 0-1 loss. All the functions here (except generate_data) are implementations of deterministic algorithms that have linear complexity in the length of the input data. Example data sets from finance, genetics and animal communication are also provided. Detailed descriptions of the underlying theory and algorithms can be found in [Kontoyiannis et al. 'Bayesian Context Trees: Modelling and exact inference for discrete time series.' [stat.ME], July 2020].


Reference manual

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


1.1 by Valentinian Mihai Lungu, a year ago

Browse source code at

Authors: Ioannis Papageorgiou , Valentinian Mihai Lungu , Ioannis Kontoyiannis

Documentation:   PDF Manual  

GPL (>= 2) license

Imports Rcpp, stringr, igraph, grDevices, graphics

Linking to Rcpp

See at CRAN