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:
Define the prior probability for the parameters to be inferred from the data (see Prior).
Link the free parameters to one or more instances of what we call a
ParameterSpaceor to a discretized spatial domain (see Discretization).Create a
Parameterizationthat groups all instances ofParameterSpaceorDiscretization.Define one or more instances of
Targetto 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 aLogLikelihoodinstance (see also Data and Likelihood). Alternatively, initializeLogLikelihoodusing your own log-likelihood function.Initialize
BayesianInversionusing the previously definedParameterizationandLogLikelihood, and sample the posterior through one or multiple Markov chains executed in parallel (detailed in Inference).Optionally, use a
Sampler(see Samplers) to customize specific sampling aspects, such as Markov chains behavior at initialization or after each iteration.