BOBE
BOBE (Bayesian Optimisation for Bayesian Evidence) is a JAX-powered Bayesian Optimisation package for efficiently estimating the Bayesian evidence for expensive likelihood functions. It is designed primarily for cosmological applications but works with any likelihood that can be called from Python. BOBE trains a Gaussian Process surrogate for the expensive likelihood and runs nested sampling on the surrogate to compute Bayesian Evidence (and parameter posteriors) efficiently. The code is implemented in JAX for high performance and automatic differentiation support. BOBE is available for download from GitHub and its core algorithm is explained in detail in our accompanying paper. We welcome bug reports, patches, feature requests, and other comments via the GitHub issue tracker.
When to use BOBE
BOBE is designed for scenarios where the likelihood evaluation is costly (e.g., takes more than a second per evaluation). In such cases, standard nested sampling or MCMC methods become computationally prohibitive since they typically require thousands to millions of likelihood evaluations.
Use BOBE if:
Your likelihood function is expensive to evaluate: Each evaluation takes more than ~1 second (e.g., due to slow forward models or complex likelihood calculations)
You need Bayesian evidence estimates: For model comparison via Bayes factors
You want posterior samples efficiently: BOBE naturally provides posterior samples alongside evidence estimates
BOBE works best for problems with up to ~20 parameters, although this can vary based on the specific problem and likelihood structure. It has been tested to work well upto 30 dimensions for simple multivariate Gaussian likelihoods and upto 16 dimensions for cosmological likelihoods (LCDM+ \(\Omega_k\) with the Planck Camspec likelihood). BOBE may not be necessary if your likelihood already evaluates in milliseconds, as the overhead of training the GP surrogate and running Bayesian optimisation may not be worth the speedup. For such cases, there is generally no need to go beyond standard MCMC/nested sampling tools.
Getting Started
To begin, follow the Installation Guide guide to get BOBE installed on your system. After that, you can learn most of what you need from the examples section (start with Quick Start and continue from there). If you need more details about any specific functionality, the User Guide (currently in development) should have you covered.
Install
Examples
User Guide
API Reference
Additional Resources