Beruflich Dokumente
Kultur Dokumente
INTRODUCTION
TO
MACHNE
LEARNNG
3RD EDTON
ETHEM ALPAYDIN
The MIT Press, 2014
alpaydin@boun.edu.tr
http://www.cmpe.boun.edu.tr/~ethem/i2ml3e
CHAPTER 14:
GRAPHCAL MODELS
Graphical Models
3
Diagnostic inference:
Knowing that the grass is wet,
what is the probability that rain is
the cause?
diagnostic
P W |R P R
P R |W
causal P W
P W |R P R
P W |R P R P W |~ R P ~ R
0.9 0.4
0.75
0.9 0.4 0.2 0.6
Conditional Independence
5
P(X,Y,Z)=P(X)P(Y|X)P(Z|Y)
P(W|C)=P(W|R)P(R|C)+P(W|~R)P(~R|C)
Case 2: Tail-to-Tail
7
P(X,Y,Z)=P(X)P(Y|X)P(Z|X)
Case 3: Head-to-Head
8
P(X,Y,Z)=P(X)P(Y)P(Z|X,Y)
Causal vs Diagnostic Inference
9
Causal inference:
P(W|C) = P(W|R,S) P(R,S|C) +
P(W|~R,S) P(~R,S|C) +
P(W|R,~S) P(R,~S|C) +
P(W|~R,~S) P(~R,~S|C)
Diagnostic: P(C|W ) = ?
Exploiting the Local Structure
11
P (F | C) = ?
P C , S , R ,W , F P C P S | C P R | C P W | S , R P F | R
d
P X1 , X d P X i | parents X i
i 1
Classification
12
px|C PC
diagnostic PC |x
px
P (C|x )
Naive Bayes Classifier
13
Chain:
( X ) P(E X | X ) Y ( X )Z ( X )
X (U) ( X )P( X |U)
X
( X ) P( X |E X ) P( X |U) X (U)
U
y ( X ) Z ( X ) ( X )
Polytrees
18
k
( X ) P( X |E ) P( X |U1 ,U2 ,,Uk ) X (Ui )
X
U1 U2 Uk i 1
y ( X ) Y ( X ) ( X )
j s
s j
Tree of moralized,
clique nodes
Undirected Graphs: Markov Random
20
Fields
In a Markov random field, dependencies are
symmetric, for example, pixels in an image
In an undirected graph, A and B are independent if
removing C makes them unconnected.
Potential function yc(Xc) shows how favorable is the
particular configuration X over the clique C
The joint is defined in terms of the clique potentials
1
p( X ) y C ( X C ) where normalizer Z y C ( X C )
Z C X C
Factor Graphs
21
1
p( X )
Z S
fS ( X S )
Learning a Graphical Model
22
decision node