SLIDE 22 11.6 Gibbs Sampling (1/2)
22
Gibbs sampling An iterative adaptive scheme that generates a single value for the conditional distribution for each component of the random vector X, rather than all values of the variables at the same time. X = X1, X2,..., X K : a random vector of K components Assume we know P(X k | X−k ),where X−k = X1, X2,..., X k−1X k+1,..., X K Gibbs sampling algorithm (Gibbs sampler)
- 1. Initialize x1(0),x2(0),...,xK(0).
- 2. i ←1
x1(1) ∼ P(X1 | x2(0),x3(0),x4(0),...,xK(0)) x2(1) ∼ P(X2 | x1(1),x3(0),x4(0),...,xK(0)) x3(1) ∼ P(X3 | x1(1),x2(1),x3(0),...,xK(0)) " xk(1) ∼ P(X k | x1(1),x2(1),...,xk−1(1),xk+1(0),xK(0)) " xK(1) ∼ P(X K | x1(1),x2(1),...,xK−1(1))
- 3. If (termination condition not met), then i ← i +1 and go to step 2.