Standard API — Overview

BayesBay standard API provides high-level tools for defining Bayesian inference problems and collecting samples from posterior distributions using 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 one or more instances of what we call a ParameterSpace or to a discretized spatial domain (see Discretization).

  3. Create a Parameterization that groups 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 also Data and Likelihood). Alternatively, initialize LogLikelihood using your own log-likelihood function.

  5. Initialize BayesianInversion using the previously defined Parameterization and LogLikelihood, and sample 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.