Professional Documents
Culture Documents
Bayesian Networks: Independencies and Inference: Scott Davies and Andrew Moore
Bayesian Networks: Independencies and Inference: Scott Davies and Andrew Moore
This implies
P ( X 1 K X n ) = P ( X i | parents ( X i ))
i =1 n
(Bayess Rule)
(Chain Rule)
(By Assumption)
P(Y | Z ) P( Z ) = P( Z | Y ) P(Y )
(Bayess Rule)
I<X,Y,Z>? Yes, just as in previous example: All Xs parents given, and Z is not a descendant.
I<X,{U},Z>? No. I<X,{U,V},Z>? Yes. Maybe I<X, S, Z> iff S acts a cutset between X and Z in an undirected version of the graph?
X has no parents, so were know all its parents values trivially Z is not a descendant of X So, I<X,{},Z>, even though theres a undirected path from X to Z through an unknown variable Y. What if we do know the value of Y, though? Or one of its descendants?
Your house has a twitchy burglar alarm that is also sometimes triggered by earthquakes. Earth arguably doesnt care whether your house is currently being burgled While you are on vacation, one of your neighbors calls and tells you your homes burglar alarm is ringing. Uh oh!
Or, ...
d-separation example
A C E G I B D F H J
I<C, {}, D>? I<C, {A}, D>? I<C, {A, B}, D>? I<C, {A, B, J}, D>? I<C, {A, B, E, J}, D>?
10
P( Ei | X ) P( X | Ei+ ) = P ( Ei | Ei+ ) = ap ( X i )? ( X i ) Where: is a constant independent of Xi (Xi) = P(Xi |Ei+) (Xi) = P(Ei-| Xi)
11
Xi
Observe Xi
Xi X i
Observe Xi
12
P(E
j
,XC = j | Xi)
P(E
j
,XC = j | Xi)
P(X
j
= j | X i ) P ( E i | X i , X C = j )
13
P(E
j
,XC = j | Xi)
P(X
j
= j | X i ) P ( E i | X i , X C = j ) = j | X i ) P ( E i | X C = j ) = j | X i )?( X C = j)
P(X
j
P(X
j
? ( X i ) = P (Ei | X i ) = =
X j C
( Xi)
P( X j | X i )?( X j ) X j C X j where j(Xi) is the contribution to P(Ei-| Xi) of the part of the evidence lying in the subtree rooted at one of Xis children Xj.
14
15
Computing (Xi)
p( X i ) = P( X i | Ei+ ) =
Xp Xi
Computing (Xi)
p( X i ) = P( X i | Ei+ ) = P ( X i , X p = j | Ei+ )
j
Xp Xi
16
Computing (Xi)
p( X i ) = P( X i | Ei+ ) = P ( X i , X p = j | Ei+ )
j
Xp Xi
= P ( X i | X p = j, E ) P ( X p = j | Ei+ )
+ i j
Computing (Xi)
p( X i ) = P( X i | Ei+ ) = P ( X i , X p = j | Ei+ )
j
Xp Xi
= P ( X i | X p = j, Ei+ ) P ( X p = j | Ei+ )
j
= P ( X i | X p = j ) P ( X p = j | Ei+ )
j
17
Computing (Xi)
p( X i ) = P( X i | Ei+ ) = P ( X i , X p = j | Ei+ )
j
Xp Xi
= P ( X i | X p = j, E ) P ( X p = j | Ei+ )
+ i j
= P ( X i | X p = j ) P ( X p = j | Ei+ )
j
= P( X i | X p = j )
j
P( X p = j | E) ? i ( X p = j)
Computing (Xi)
p( X i ) = P ( X i | Ei+ ) = P( X i , X p = j | Ei+ )
j
= P ( X i | X p = j, Ei+ ) P( X p = j | Ei+ )
Xp Xi
j
= P ( X i | X p = j) P( X p = j | Ei+ )
j
= P ( X i | X p = j)
j j
P( X p = j | E ) ? i ( X p = j)
= P ( X i | X p = j)p i ( X p = j)
P( X p | E ) ?i(X p)
18
Conjunctive queries
What if we want, e.g., P(A, B | C) instead of just marginal distributions P(A | C) and P(B | C)? Just use chain rule: P(A, B | C) = P(A | C) P(B | A, C) Each of the latter probabilities can be computed using the technique just discussed.
19
Polytrees
Technique can be generalized to polytrees: undirected versions of the graphs are still trees, but nodes can have more than one parent
20
Join trees
Arbitrary Bayesian network can be transformed via some evil graph-theoretic magic into a join tree in which a similar method can be employed.
A B E D F In the worst case the join tree nodes must take on exponentially many combinations of values, but often works well in practice C G DF BCD ABC BCD
21