Standard API — Overview

BayesBay’s standard API offers comprehensive utilities for defining Bayesian inference problems and collecting samples from posterior distributions via Markov chain Monte Carlo (MCMC). The typical workflow includes the following steps:

  1. Define the prior probability for the parameters to be inferred from the data (see Prior)

  2. Link the free parameters to what we call a ParameterSpace or to a discretized spatial domain (see Discretization)

  3. Create a Parameterization that encompasses all instances of ParameterSpace or Discretization

  4. Define one or more instances of Target to store information about the observed data and their associated noise. Use such instances, along with forward functions that enable data predictions from the considered model parameters, to define a LogLikelihood instance (see Data and Likelihood).

  5. Configure an instance of BayesianInversion using the previously defined objects, enabling the sampling of the posterior through one or multiple Markov chains executed in parallel (detailed in Inference)

  6. Optionally, use a Sampler (see Samplers) to customize specific sampling aspects, such as Markov chains behavior at initialization or after each iteration.

  7. Run the inversion (bayesbay.BayesianInversion.run()).