26.10.2013 Views

Nonparametric Bayesian Discrete Latent Variable Models for ...

Nonparametric Bayesian Discrete Latent Variable Models for ...

Nonparametric Bayesian Discrete Latent Variable Models for ...

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.

3.2 MCMC Inference in Dirichlet Process Mixture <strong>Models</strong><br />

ratio of changing the component assignment ci from k to j is given as:<br />

⎧<br />

1, if j ≤ K † and K † = K †<br />

kj<br />

M(K †<br />

kj ) <br />

, if j ≤ K † and K †<br />

kj < K†<br />

<br />

⎪⎨ min 1,<br />

α =<br />

κ(K† )<br />

κ(K †<br />

kj )<br />

<br />

⎪⎩<br />

min 1, κ(K† )<br />

κ(K †<br />

kj )<br />

F (xi | θk)<br />

F (xi | θj)<br />

M(K † <br />

, if j > K<br />

)<br />

†<br />

(3.47)<br />

where we used K †<br />

kj to denote the index of the last active component after changing<br />

component assignment of xi <strong>for</strong>m k to j. Thus, the algorithm behaves like a Gibbs<br />

sampler when the assignment to an already represented component is proposed if this<br />

move does not change last active component. This algorithm provides a sampler that<br />

does not need to resort to approximations. However, the choice of Mi should be made<br />

carefully to satisfy detailed balance when the index <strong>for</strong> the last active component changes<br />

and obtain a good mixing per<strong>for</strong>mance.<br />

Algorithm 9 Retrospective sampling <strong>for</strong> DPM models using stick-breaking construction<br />

The state of the Markov chain consists of the stick lengths (mixing proportions) and<br />

the component parameters.<br />

Only the mixing proportions and parameters of the components up to and including<br />

the last active component are represented.<br />

Repeatedly sample:<br />

<strong>for</strong> all i = 1, . . . , N do<br />

Sample ui ∼ Uni<strong>for</strong>m[0, 1]<br />

Evaluate the posterior probabilities <strong>for</strong> component assignments using eq. (3.45).<br />

if k<br />

l=1 P (ci = l) > ui <strong>for</strong> k ≤ K † then<br />

Represent more components by breaking the stick to obtain the mixing propor-<br />

tions and sampling parameters from the prior until k<br />

l=1 P (ci = l) < ui <strong>for</strong><br />

l ≤ K † .<br />

end if<br />

Propose to move to ci = inf{k ≤ K † : k<br />

l=1 P (ci = l) < ui}<br />

Evaluate the proposal with eq. (3.47)<br />

end <strong>for</strong><br />

Slice Sampling<br />

The idea of auxiliary variable methods is sampling <strong>for</strong> the variables we are interested in<br />

by using auxiliary variables which make the updates easier to handle. Slice sampling is<br />

an auxiliary variable method that exploits the fact that sampling from a distribution is<br />

equivalent to sampling uni<strong>for</strong>mly from the region under its probability density function<br />

37

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

Saved successfully!

Ooh no, something went wrong!