Probabilistic Graphical Models
David Sontag
New York University
Lecture 2, February 7, 2013
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 1 / 31
Probabilistic Graphical Models David Sontag New York University - - PowerPoint PPT Presentation
Probabilistic Graphical Models David Sontag New York University Lecture 2, February 7, 2013 David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 1 / 31 Bayesian networks Reminder of last lecture A Bayesian network is specified by
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 1 / 31
1
2
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 2 / 31
Grade Letter SAT Intelligence Difficulty d1 d0
0.6 0.4
i1 i0
0.7 0.3
i0 i1 s1 s0
0.95 0.2 0.05 0.8
g1 g2 g2 l1 l 0
0.1 0.4 0.99 0.9 0.6 0.01
i0,d0 i0,d1 i0,d0 i0,d1 g2 g3 g1
0.3 0.05 0.9 0.5 0.4 0.25 0.08 0.3 0.3 0.7 0.02 0.2
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 3 / 31
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 4 / 31
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 5 / 31
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 6 / 31
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 7 / 31
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 8 / 31
X1 X2 X3 X4 X5 X6 Y1 Y2 Y3 Y4 Y5 Y6
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 9 / 31
X1 X2 X3 X4 X5 X6 Y1 Y2 Y3 Y4 Y5 Y6
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 10 / 31
1
2
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 11 / 31
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 12 / 31
+"/,9#)1 +.&),3&'(1 "65%51 :5)2,'0("'1 .&/,0,"'1
2,'3$1 4$3,5)%1 &(2,#)1 6$332,)%1 )+".()1 65)&65//1 )"##&.1 65)7&(65//1 8""(65//1
weather+ .50+ finance+ .49+ sports+ .01+
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 13 / 31
1 Sample the document’s topic distribution θ (aka topic vector)
2 For i = 1 to N, sample the topic zi of the i’th word
3 ... and then sample the actual word wi from the zi’th topic
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 14 / 31
1
t=1 are hyperparameters.The Dirichlet density, defined over
t=1 θt = 1}, is:
T
t
α1 = α2 = α3 =
θ1 θ2 log Pr(θ) θ1 θ2 log Pr(θ)
α1 = α2 = α3 = David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 15 / 31
3 ... and then sample the actual word wi from the zi’th topic
poli6cs+.0100+ president+.0095+
washington+.0085+ religion+.0060+
religion+.0500+ hindu+.0092+ judiasm+.0080+ ethics+.0075+ buddhism+.0016+ sports+.0105+ baseball+.0100+ soccer+.0055+ basketball+.0050+ football+.0045+
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 16 / 31
gene 0.04 dna 0.02 genetic 0.01 .,, life 0.02 evolve 0.01
.,, brain 0.04 neuron 0.02 nerve 0.01 ... data 0.02 number 0.02 computer 0.01 .,,
Topics Documents Topic proportions and assignments
(Blei, Introduction to Probabilistic Topic Models, 2011) David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 17 / 31
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 18 / 31
i = 1 to N d = 1 to D
wid
Prior distribution
Topic of doc d Word
β
Topic-word distributions
θ zd α
Dirichlet hyperparameters i = 1 to N d = 1 to D
θd wid zid
Topic distribution for document Topic of word i of doc d Word
β
Topic-word distributions
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 19 / 31
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 20 / 31
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 21 / 31
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 22 / 31
Z1 Z2 Z3 Z4
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 23 / 31
x1,...,ˆ xn
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 24 / 31
x1,...,ˆ xn
B A C 10 1 1 10 A B 1 1
φA,B(a, b) =
10 1 1 10 B C 1 1
φB,C(b, c) = φA,C(a, c) =
10 1 1 10 A C 1 1
a,ˆ b,ˆ c∈{0,1}3
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 25 / 31
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 26 / 31
XA XB XC
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 27 / 31
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 28 / 31
X
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 29 / 31
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 30 / 31
David Sontag (NYU) Graphical Models Lecture 2, February 7, 2013 31 / 31