ps2-practice-sol

ps2-practice-sol - CS228 Practice Questions 1 CS 228,...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS228 Practice Questions 1 CS 228, Winter 2010 Practice Questions 1. Collapsed Gibbs Sampling In this problem we will explore a few variations of Collapsed Gibbs sampling. Consider a Bayesian Network such as the one in Figure 1 representing how a small towns voters V = { V 1 ,...,V k } are affected by the quality of two sets of volunteers: K = { K 1 ,...,K n } for the Kerry campaign and B = { B 1 ,...,B m } for the Bush campaign. Each party talks to each voter exactly once via a particular one of its volunteers. Our goal is to estimate the distribution over the quality of the volunteers given how the population voted, P ( B , K | v ). You may assume the following: The range of volunteer quality is discretized such that for any volunteer X B K we have that | V al ( X ) | = d . The voter makes his or her decision known freely to anyone, giving us the evidence V = v . K K B K n V 1 2 V V k V k-1 1 B 2 B 2 1 m Figure 1: Network for collapsed gibbs sampling (a) [12 points] The first sampling algorithm we explore computes a set of collapsed particles, each of which specifies an assignment to the B variables, and a closed-form distribution over the K variables: ( b [ ] ,P ( K ) ) , where P ( K ) = P ( K | b [ ] , v ). i. [4 points] Show how to efficiently compute, in closed form, the distribution P ( K ). Answer: We first observe that ( K i K j | B , V ) since there is no active path between any K i and K j pair given B and V . Thus we have, P ( K ) = P ( K | b [ ] , v ) = n productdisplay i =1 P ( K i | b [ ] , v ) = n productdisplay i =1 P ( K i | b K i [ ] , v K i ) where we have written b K i [ ] to be the assignment to the subset of variables B in the Markov blanket of K i (i.e. B K i = B MB ( K i )), and, similarly, v K i to be the assignment to the children of K i . CS228 Practice Questions 2 Now using Bayes rule, we can write P ( K i | b [ ] , v ) = P ( K i | b K i [ ] , v K i ) = P ( v K i | K i , b K i [ ]) P ( K i ) P ( b K i [ ]) Z = P ( K i ) producttext V j V K i P ( v j | K i , b V j [ ]) P ( b V j [ ]) Z where Z = k V al ( K ) producttext V j V K i P ( v j | K i = k, b V j [ ]) P ( K i = k ) P ( b V j [ ]) is the normalizing term, and b V j [ ] is the assignment to the parent of V j in B . Note that P ( b V j [ ]) appears the same in both the numerator and the denominator (and can be taken out of the summation in the denominator), so it can be canceled out. So we can efficiently compute P ( K ) using the individual CPDs of the K i s and V j s. ii. [4 points] Describe precisely the Gibbs sampling step that generates the next sample ( b [ + 1] ,P +1 ( K ) ) given the current sample ( b [ ] ,P ( K ) ) ....
View Full Document

Page1 / 7

ps2-practice-sol - CS228 Practice Questions 1 CS 228,...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online