Difference between revisions of "Gibbs sampling"

From Cohen Courses
Jump to navigationJump to search
Line 1: Line 1:
 
Gibbs 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 [[UsesMethod :: 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.
 
Gibbs 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 [[UsesMethod :: 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
  
 
:<math>p(x_j|x_1,\dots,x_{j-1},x_{j+1},\dots,x_n) = \frac{p(x_1,\dots,x_n)}{p(x_1,\dots,x_{j-1},x_{j+1},\dots,x_n)} \propto p(x_1,\dots,x_n)</math>
 
:<math>p(x_j|x_1,\dots,x_{j-1},x_{j+1},\dots,x_n) = \frac{p(x_1,\dots,x_n)}{p(x_1,\dots,x_{j-1},x_{j+1},\dots,x_n)} \propto p(x_1,\dots,x_n)</math>
 +
 +
* Stop after a threshold criteria is achieved which may be a stable likelihood of the data.

Revision as of 00:24, 1 April 2011

Gibbs 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.