bacontrees: An extensible framework for Bayesian Context Trees in R
Victor Freguglia, Thiago Paulichen
Abstract
Context tree models, or variable-length Markov chains, describe symbolic sequences whose dependence structure varies with context length. Bayesian formulations of these models enable uncertainty quantification and regularization through priors on tree structures and transition probabilities. Despite their theoretical appeal, practical implementations have been fragmented and model-specific. The bacontrees package for R provides a unified framework for Bayesian Context Trees by defining core data structures and a consistent interface for building, modifying and manipulating trees. Rather than implementing a single inference method, bacontrees offers the computational foundation upon which diverse Bayesian and frequentist algorithms can be developed. This separation of representation and inference promotes reproducibility and facilitates experimentation with new modeling strategies. The package aims to support applications in information theory, linguistics, and other domains where context-based probabilistic modeling is central.
Create a lesson
Related papers
BEAGLE in Action: Phylogenetic Likelihoods for Very Large State Spaces
Benjamin D Redelings, April Wright, Karthik Gangavarapu et al.
Fast nonparametric estimation of sparse precision matrices with a priori sparsity structure
Caleb Derrickson, Alexis Montoison, Vishwas Rao et al.
Interval-valued circular time series: A cylindrical score-driven approach with an application to wind direction
Thasmika Mohan, Najmeh Nakhaei Rad, Sphiwe Skhosana et al.
Subgradient Methods for Nonsmooth Sample Average Approximation
Xi Chen, Ouqi Fu, Jiyuan Tu et al.
Spectral Gap Inheritance for Metropolis-Hastings with Reversible Proposals
Minhyeok Kim, Vinayak Rao
Eunoia: Area-Proportional Euler and Venn Diagrams in Rust, Julia, Python, R, and JavaScript
Johan Larsson, Nicole M. Lee