08.10.2016 Views

Foundations of Data Science

2dLYwbK

2dLYwbK

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

d-dimensional lattice except that the vertices in the same coordinate line form a clique.<br />

To generate samples <strong>of</strong> x = (x 1 , . . . , x d ) with a target distribution p (x), the Gibbs<br />

sampling algorithm repeats the following steps. One <strong>of</strong> the variables x i is chosen to be<br />

updated. Its new value is chosen based on the marginal probability <strong>of</strong> x i with the other<br />

variables fixed. There are two commonly used schemes to determine which x i to update.<br />

One scheme is to choose x i randomly, the other is to choose x i by sequentially scanning<br />

from x 1 to x d .<br />

Suppose that x and y are two states that differ in only one coordinate. Without loss<br />

<strong>of</strong> generality let that coordinate be the first. Then, in the scheme where a coordinate is<br />

randomly chosen to modify, the probability p xy <strong>of</strong> going from x to y is<br />

The normalizing constant is 1/d since ∑ y 1<br />

d coordinates gives a value <strong>of</strong> d. Similarly,<br />

p xy = 1 d p(y 1|x 2 , x 3 , . . . , x d ).<br />

p(y 1 |x 2 , x 3 , . . . , x d ) equals 1 and summing over<br />

p yx = 1 d p(x 1|y 2 , y 3 , . . . , y d )<br />

= 1 d p(x 1|x 2 , x 3 , . . . , x d ).<br />

Here use was made <strong>of</strong> the fact that for j ≠ 1, x j = y j .<br />

It is simple to see that this chain has stationary probability proportional to p (x).<br />

Rewrite p xy as<br />

p xy = 1 p(y 1 |x 2 , x 3 , . . . , x d )p(x 2 , x 3 , . . . , x d )<br />

d p(x 2 , x 3 , . . . , x d )<br />

= 1 p(y 1 , x 2 , x 3 , . . . , x d )<br />

d p(x 2 , x 3 , . . . , x d )<br />

= 1 p(y)<br />

d p(x 2 , x 3 , . . . , x d )<br />

again using x j = y j for j ≠ 1. Similarly write<br />

p yx = 1 p(x)<br />

d p(x 2 , x 3 , . . . , x d )<br />

from which it follows that p(x)p xy = p(y)p yx . By Lemma 5.3 the stationary probability<br />

<strong>of</strong> the random walk is p(x).<br />

148

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!