Homepage Solution manuals Kevin P. Murphy Machine Learning: a Probabilistic Perspective Exercise 3.13 - Posterior predictive distribution for a batch of data with the dirichlet-multinomial model

Exercise 3.13 - Posterior predictive distribution for a batch of data with the dirichlet-multinomial model

Answers

The likelihood for Dirichlet-multinomial model is:

p ( 𝒟 | 𝜃 ) = k = 1 K 𝜃 k N k old ,

following the symbols defined in the textbook. The conjugate prior is the Dirichlet distribution:

p ( 𝜃 | α ) = 1 B ( α ) k = 1 K 𝜃 k α k 1 ,

where 𝜃 is a K -dimension simplex. The (3.37) in the textbook mistake 𝜃 for 𝐱 .

The posterior distribution is another Dirichlet distribution with update:

α k + N k old α k .

To predict a new batch of data 𝒟 ~ , we begin with one sample x 𝒟 ~ :

p ( x = k | 𝒟 , α ) = 𝜃 p ( x = k | 𝜃 ) p ( 𝜃 | 𝒟 , α ) d 𝜃 = 𝔼 Dir [ 𝜃 k ] ,

where the expectation is computed w.r.t. the posterior Dirichlet distribution, hence is:

α k + N k old t = 1 K α t + N t old .

Finally,

p ( 𝒟 ~ | 𝒟 , α ) = x 𝒟 ~ p ( x | 𝒟 , α ) = k = 1 K ( α k + N k old t = 1 K α t + N t old ) N k new .

User profile picture
2021-03-24 13:42
Comments