major representation of the N ⇥N matrix which contains the expected transition
counts. The element e
ij
of this matrix is the expected number of transitions
from state i to state j given the observation sequence. The last N ⇤ M columns
of the output block matrix st or e the row major representation of the N ⇥ M
matrix of expected emission counts. The ele ment f
ij
of this matrix contains
the expected numbe r of times the symbol j is emitted from st ate i given the
observation sequence. When all the bl ocks of the input DRM of observation
sequences are processed, the parameters of the model are updated as follows.
• To update t h e initial probabilities vector, compute the total count of ex-
pected number of times of being in state i at time t = 0 for all 0 N 1.
The element ⇡
i
is calculated as th e ratio of the total count of expected
number of times of b ei n g in state i at time t = 0 and the sum of counts
for all states.
• State Transition Probability Distribution To update row i of the transition
matrix, for each element a
ij
we need to comput e th e cumulative expected
number of transitions from state i to state j from all the observation
sequences. The sum of all these cumulative ex pected number of transitions
gives us the tot al e xpected number of times the state i is visited. If we
divide the cumulative expected number of transitions from state i to state
j from all the observation sequences by the total expected number of
times the state i is visited, we get the updated probabili ty of transition
from state i to state j.
• Emission Probability Distribution To update row j of the emission ma-
trix, for each element b
j
(k), we need to compute the cumulative expected
number of t i me s the symbol k is emitted while being in state j from all the
observation sequences. The sum of all thes e cumulative expected number
of emissions gives us th e total expected number of times the stat e j is
visited. If we d i v id e the cumulative expected number of emissions from
state j of symbol k by the total expected number of times the stat e j is
visited, we get t h e updated probability of emission from state j of symbol
k.
References
[1] Dawei Shen, Some Mathematics for HMM. https://pdfs.
semanticscholar.org/4ce1/9ab0e07da9aa10be1c336400c8e4d8fc36c5.
pdf
[2] Jimmy Lin and Chris Dyer, Data-intensi ve text processing with MapRe-
duce. https://http://www.iro.umontreal.ca/
~
nie/IFT6255/Books/
MapReduce.pdf
[3] Xiaolin Li, Marc Parizeau and Rejean Plamondon, Training Hidden
Markov Models with Multiple Observations ? A Combinatoria l Method
7