Professional Documents
Culture Documents
1
Probabilistic Graphical Models Srihari
Topics
3
Probabilistic Graphical Models Srihari
5
Probabilistic Graphical Models Srihari
Shortcoming of Forcing
• Forcing S=s1 fails to account for:
– Node S is more likely to take value S=s1
when parent I=i1 than when I=i0
• Contrast with rejection sampling:
– With I=i1 we would have generated S=s1
80% of the time
• With I=i0 would have generated S=s1 only
5% of the time
– To simulate this long-run behavior with
forcing
– Sample where we have I=i1 and force S=s1 should be
80% of a sample whereas I=i0 and force S=s1 is worth 6
5% of a sample
Probabilistic Graphical Models Srihari
Intuition of Weighting
• Weights of samples = likelihood of evidence
accumulated during sampling process
– Evidence consists of: l0,s1
– Using forward sampling, assume that we sample D=d1, I=i0
– Based on evidence, Set S=s1
– Sample G=g2
– Based on evidence, Set L=l0
– Total sample is: {D=d1, I=i0, G=g2, S=s1, L=l0 }
– Compensation for evidence l0,s1 which are not sampled
– Given I=i0, forward sampling would have generated
S=s1 with probability 0.05
– Given G=g2 forward sampling would have generated
L=l0 with probability 0.4
– Each event is the result of an independent coin toss
• probability that both would have occurred is their product
– Weight required for this sample to compensate for the
setting for the evidence is 0.05✕0.4=0.02
8
Probabilistic Graphical Models Srihari
∑ w[m]
m=1
Importance Sampling
• Let X be a set of variables that take on values
in some space Val(X)
• Importance sampling is a general approach for
estimating the expectation of a function f(x)
relative to some distribution P(X) typically
called the target distribution
• We can estimate this expectation by generating
samples x[1],..,x[M] from P
12
Probabilistic Graphical Models Srihari
=E ⎡ f (X)⎤⎦ 15
P(X) ⎣
Probabilistic Graphical Models Srihari
P(x)
E P(X )[f (X)] = ∑ P(x)f (x) = ∑Q(x)f (x)
x x Q(x)
1 P̂(x) 1 EQ(X )[f (x)w(X)]
=
Z
∑Q(x)f (x)Q(x) = Z EQ(X )[f (x)w(X)] = E [w(X)]
x Q(X )
24
Probabilistic Graphical Models Srihari
27
Probabilistic Graphical Models Srihari
28
Probabilistic Graphical Models Srihari
Q: Posterior: P(G,S,L|D=d1,I=i1)
29
Probabilistic Graphical Models Srihari
Q: Prior: P(G,S,L,D,I)
Leaf
Nodes
30