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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.2.2 Algorithms <strong>for</strong> non-Conjugate DP <strong>Models</strong><br />

No Gaps Algorithm<br />

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

The algorithms described above use the indicator variables ci, i = 1, . . . , N to assign<br />

identical values of θ to the component parameters φ. The set of numerical values of<br />

ci do not have significance beyond denoting the grouping. The ”no gaps” algorithm of<br />

MacEachern and Müller (1998) constrains the labels of the active components to cover<br />

the integers from 1 to K ‡ , and augments the state to include empty components so as<br />

to have a total of N represented components, i.e. K † = N. Augmenting the model<br />

replaces the integral evaluations with likelihood evaluations.<br />

The state of the Markov chain consists of the indicator variables and the parameters<br />

of the N components, K ‡ of which have data assigned, the rest being empty. First the<br />

to denote the<br />

number of distinct groups of data not including the ith data point. Label the groups<br />

indicator variable of each data point i is updated as follows. Use K ‡<br />

−<br />

from 1 to K ‡<br />

− . If ci is a singleton, with probability K ‡<br />

− /(K‡ − + 1) leave ci unchanged,<br />

otherwise label ci as (K ‡<br />

− + 1), consequently assigning φK ‡ to be the existing value<br />

− +1<br />

<strong>for</strong> φci . Update ci with the following probabilities:<br />

P (ci = k | xi, c−i, φ) ∝ n−i,kF (xi | φk) <strong>for</strong> k = 1, . . . , K ‡<br />

− ,<br />

P (ci = K ‡<br />

− + 1 | xi, c−i, φ) ∝<br />

α<br />

K ‡<br />

− + 1F (xi | φ K ‡<br />

− +1)<br />

(3.33)<br />

After the indicator updates, update the component parameters by sampling from their<br />

conditional posterior, eq. (3.31).<br />

Algorithm 4 The No-Gaps algorithm <strong>for</strong> non-conjugate DPM models.<br />

The state of the Markov chain consists of the indicator variables c = {c1, . . . , cN} and<br />

N component parameters Φ = {φ1, . . . , φN}<br />

Of the N parameters, only K ‡ + 1 of them are represented<br />

Repeatedly sample:<br />

<strong>for</strong> all i = 1, . . . , N do {indicator updates}<br />

denote the number of active components without considering xi<br />

Let K ‡<br />

−<br />

if ci is a singleton then<br />

With probability K ‡<br />

− /(K‡ − + 1) do not update ci,<br />

otherwise, label ci as K ‡<br />

−<br />

end if<br />

+ 1<br />

Label the components of all data points other than i from 1 to K ‡<br />

−<br />

Update ci using eq. (3.33)<br />

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

<strong>for</strong> all k = 1, . . . , N do {parameter updates}<br />

Update φk by sampling from its posterior, eq. (3.31)<br />

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

29

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

Saved successfully!

Ooh no, something went wrong!