# Bayesian Sampling of Parameters

MELD has the ability to perform Bayesian sampling over parameters, which allows for the value of those parameters to “be decided by the system”.

Formally, MELD samples the joint posterior distribution of structures $$x$$ and parameters $$y$$ given some data $$D$$.

$p(x, y | D) \propto p(x) p(y) p(D | x, y)$

where, $$p(x, y | D)$$ is the posterior distribution that we are sampling over, $$p(D | x , y)$$ is the likelihood function, and $$p(x)$$ and $$p(y)$$ are the priors over the structures $$x$$ and parameters $$y$$.

Typically, we are interested in the marginal distribution $$p(x|D)$$, which is obtained by integrating out $$y$$.

Practical details can be found at How to use parameter sampling.