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.

4.2 MCMC Sampling algorithms <strong>for</strong> IBLF models<br />

Algorithm 12 Approximate Gibbs sampling <strong>for</strong> non-conjugate IBP<br />

The state of the Markov chain consists of the infinite feature matrix Z and the set of<br />

infinitely many parameters Θ = θ1:∞.<br />

Only the K ‡ active columns of Z and the corresponding parameters are represented.<br />

Repeatedly sample:<br />

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

<strong>for</strong> all columns k = 1, . . . , K ‡ do<br />

if m−i,k > 0 then<br />

Update zik by sampling from its conditional posterior, eq. (4.36).<br />

else {m−i,k = 0}<br />

Set one of the unallocated auxiliary parameters ˆ θj to θk.<br />

end if<br />

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

Remove the columns of Z <strong>for</strong> which m−i,k = 0 and the corresponding parameters<br />

θk from the representation.<br />

Sample values from the prior G0 <strong>for</strong> the yet unallocated auxiliary parameters ˆ θj.<br />

<strong>for</strong> all l = 1, . . . , 2 ˆ K do<br />

Calculate the posterior <strong>for</strong> ˆ Zl using eq. (4.39)<br />

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

Pick a feature combination ˆ Zl with probabilities calculated above<br />

Update Θ by appending ˆ Θ<br />

Update Z by appending ˆ Zl<br />

Remove zero columns of Z and the corresponding parameters θk from the representation.<br />

Discard ˆ Zl and ˆ Θ<br />

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

<strong>for</strong> all active columns k = 1, . . . , K ‡ do {Parameter updates}<br />

Update θk by sampling from its conditional posterior, eq. (4.35)<br />

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

87

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

Saved successfully!

Ooh no, something went wrong!