52
1. Draw a latent variable η ~Beta(α + l,n).
2. Sample a from the mixtures of gammas:
πηGa(a ∣ a + K, b — log η) + (1 - πη)Ga(a ∣ a + K — 1, b — log η), (3.23)
where,
πη aK — 1
1 - ⅜ n(b - log η)
Finally, we define a transition probability to update 7. Recall that 7 is introduced
into the model through Gq. We get, from (3.14),
к
p(^f I xn, θ*, φ, K, σ) = p(7 I θ*, K) oc p(7) ɪɪ g0(θ*k ∣ 7). (3.24)
fe=l
For computational reasons, in applications it is convenient to assume a prior distribu-
tion p(7) that is conjugate to g^. We need to add a new step to our Gibbs sampling
scheme:
(e) Conditional on K and φ we update 7 using (3.24).
As technical note, in their examples Escobar and West (1995) noticed that the MCMC
scheme stated above can get “trapped” in local modes of the posterior distribution.
To “free” it, instead of running a much longer chain, they suggest to reinitialize every
certain number of Gibbs sampling iterations, for example, 10,000 by the configuration
with K — n and new values for θγ,...,θ↑l resampled from giβ in (3.20) without
changing the current values of the remaining parameters.
3.2.4 Example of Application of DPM in Density Estimation
In this section we present an application of a Dirichlet Process Mixture (DPM) model
to non-parametric density estimation.
We use the Boston housing-price data from Harrison and Rubinfeld (1978). This
data appears online as Boston data in the statlib index. The file contains measure-
ments of 13 characteristics of houses in Boston and their price (named MEDV in