Professional Documents
Culture Documents
Markov Networks
Markov Networks
Alan Ritter
Markov Networks
• Undirected graphical models
Smoking Cancer
Asthma Cough
Potential functions defined over cliques
Smoking Cancer Ф(S,C)
1
P( x) c ( xc ) False False 4.5
Z c
False True 4.5
G L P
p(x) > 0
Pairwise:
Local:
Global:
Converting a Bayesian Network to a Markov
Network
• Tempting:
– Just drop directionality of the edges
– But this is clearly incorrect (v-structure)
– Introduces incorrect CI statements
• Solution:
– Add edges between “unmarried” parents
– This process is called moralization
Example: moralization
2 4
1 5 7
3 6
Z is the partition
function
1
Example
2 3
• If P satisfies the conditional
independence assumptions 4 5
of this graph, we can write
Pairwise MRF
• Potentials don’t need to
correspond to maximal 1
cliques
• We can also restrict 2 3
parameterization to edges
(or any other cliques) 4 5
• Pairwise MRF:
Representing Potential Functions
• Can represent as CPTs like we did for Bayesian
Networks (DGMs)
– But, potentials are not probabilities
– Represent relative “compatibility” between
various assignments
Representing Potential Functions
• More general approach:
– Represent the log potentials as a linear function of
the parameters
– Log-linear (maximum entropy) models
Log-Linear Models
Smoking Cancer
Asthma Cough
Log-linear model:
1
P( x) exp wi f i ( x)
Z i
Weight of Feature i Feature i
1 if Smoking Cancer
f1 (Smoking, Cancer )
0 otherwise
w1 0.51
Log-Linear models can
represent Table CPTs
• Consider pairwise MRF where each edge has
an associated potential w/ K^2 features: