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
ParameterSpace
or to a discretized spatial domain (see Discretization).Create a
Parameterization
that groups all instances ofParameterSpace
orDiscretization
.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 aLogLikelihood
instance (see also Data and Likelihood). Alternatively, initializeLogLikelihood
using your own log-likelihood function.Initialize
BayesianInversion
using the previously definedParameterization
andLogLikelihood
, 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.