Professional Documents
Culture Documents
end
print current parameter and P(sequence, viterbi path)
Repeat the above procedure several times (with different
random seed), and compare P(sequence, viterbi path).
Report the parameters learned that give the largest P.
Backward-Forward algorithm:
Compute sum of probabilities in log space
Two probabilities x and y, x < y
lx = log(x), ly = log(y),
(lx < ly)
z = x + y = y (1 + x/y)
lz = log(z) = log(x+y)
= log(y) + log(1 + x/y)
= ly + log(1 + exp(log(x)-log(y))
= ly + log(1 + exp(lx ly))
Also see page 4 in this doc:
http://cs.utsa.edu/~jruan/teaching/cs5263_fall_2007/proj1.pdf
and page 77 of the handouts.