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:
Define the prior probability for the parameters to be inferred from the data (see Prior)
Link the free parameters to what we call a
ParameterSpace
or to a discretized spatial domain (see Discretization)Create a
Parameterization
that encompasses 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 Data and Likelihood).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)Optionally, use a
Sampler
(see Samplers) to customize specific sampling aspects, such as Markov chains behavior at initialization or after each iteration.Run the inversion (
bayesbay.BayesianInversion.run()
).