Professional Documents
Culture Documents
Homework hmm2
Homework hmm2
Exercises: HMM
Laura Kallmeyer
P (chief |V) = 0
P (talks|V) = 0.4
...
V
0.4
0.2
start 0.3 0.4
0.3
0.5 0.3
0.4 A N
...
0.2
end
1. Given this HMM, calculate the forward and backward probabilities α and β for the observation
sequence “chief talks”.
2. What is the probability of this sequence? How can this probability be obtained from the α and β
tables?
Solution:
Exercise 2 Now consider again the ice cream example from the course slides:
0.6 0.4
start end
0.3 0.4
0.3 0.2
0.4
H C
P (1|H) = 0.5 0.4 P (1|C) = 0.5
P (3|H) = 0.5 P (3|C) = 0.5
Calculate one iteration of the forward-backward EM algorithm in order to estimate new probabilities.
Solution:
t H C j =H j =C
E-step: γ: 1 0.33 0.67 ξ1 : i =H 0.22 0.11
2 0.67 0.33 i =C 0.44 0.22
M-step:
0.67 0.67
start end
0.22 0.22
0.11
0.33
0.33
H C
P (1|H) = 0.67 0.44 P (1|C) = 0.33
P (3|H) = 0.33 P (3|C) = 0.67
P (31) = 0.11
t H C j =H j =C
E-step: γ: 1 0.11 0.89 ξ1 : i =H 9.86 · 10−2 1.22 · 10−2
2 0.89 0.11 i =C 0.79 9.86 · 10−2
M-step:
0.89 0.89
start end
9.86 · 10−2 9.86 · 10−2
1.22 · 10−2
0.11
0.11
H C
P (1|H) = 0.89 0.79 P (1|C) = 0.11
P (3|H) = 0.11 P (3|C) = 0.89
P (31) = 0.5
t H C j =H j =C
E-step: γ: 1 1.9 · 10−3 1 ξ1 : i =H 1.9 · 10−3 0
2 1 1.9 · 10−3 i =C 1 1.9 · 10−3
M-step:
1 1
start end
1.9 · 10−3 1.9 · 10−3
0
1.9 · 10−3
1.9 · 10−3
H C
P (1|H) = 1 1 P (1|C) = 1.95 · 10−3
P (3|H) = 1.9 · 10−3 P (3|C) = 1
P (31) = 0.99
t H C j =H j =C
E-step: γ: 1 0 1 ξ1 : i =H 0 0
2 1 0 i =C 1 0
M-step:
1 1
start end
0 0
0
0
0
H C
P (1|H) = 1 1 P (1|C) = 3 · 10−5
P (3|H) = 0 P (3|C) = 1
P (31) = 1