Gibbs sampling
From Cohen Courses
Jump to navigationJump to searchGibbs sampling is used to sample from the stable joint distribution of two or more random variables when accurate computation of the integral or a marginal is intractable. Usually some variables in this set of random variables are the actual observables and hence there values need not be sampled in the Gibbs sampling iterations. This form of approximate inference method is generally used when doing posterior probability inference in probabilistic graphical models where computation of marginals are intractable.
Algorithm
- Initialize the state of the sampler by assigning uniformly values to each of the random variables in the joint probability distribution
- Repeatedly sample a random variable conditioned on the current values of all the other random variables as shown in the formula below
- Stop after a threshold criteria is achieved which may be a stable likelihood of the data.