Introduction To HMM
Introduction To HMM
Achmad Arifin
Electrical Engineering Department, ITS
[email protected]
(Summarized from: Advanced Digital Signal
Processing and Noise Reduction, Saeed V. Vaseghi,
John Wiley & Sons Ltd
Abstract
⚫ Hiddden Markov models (HMMs) are used for the statistical
modelling of non-stationary signal processes, e.g. physiological
siganals (ECG, EMG, EEG, etc.), image data, and other time-
varying data (gold price, stock price, random noise, etc.).
⚫ A non-stationary model:
a double-layered stochastic
process.
A hidden process controls
time variations of the
statistics of the observable
process.
Continuous and Finite State
⚫ Classification: a) continuously variable state process, b) finite state
process.
⚫ At each time instant a random switch selects one of the two AR models for
connection to the output terminal.
x ( m ) = s ( m ) x0 ( m ) + s ( m ) x1 ( m )
s
of M prototype vectors model the centroids of the signal space associated with each state.
⚫ State observation vector probability model. This can be either a discrete
... o K and general structure of HMM (numbers of hidden and visible states),
a = P(s | s ) =
ij i j
Number of transitions from state s to
j state s i
s to state s
Expected number of transitions from state j
a = P(s | s ) = Expected number of transitions out of state s
ij i j
j
= P(s ) =
i i Expected frequency in state s at time k=1.
i
Baum-Welch algorithm: expectation
step(1)
• Define variable (i,j) as
k s at time k and in
the probability of being in state i
state s at
j time k+1, given the observation sequence o o ... o . 1 2 K
(i) a b (o )
i j k ij j k+1 k+1(j)
Baum-Welch algorithm: expectation
step(2)
• Define variable (i) as
k the probability of being in state s at time k, given
i
= (i,j)
k k
START
Size Transition Probability:
{Rainy={Rainy=0.4, Cloudy=0.2, Sunny=0.4},
Cloudy={Rainy=0.5, Cloudy=0.4, Sunny=0.1},
Sunny={Rainy=0.1, Cloudy=0.3, Sunny=0.6}}
Hidden State
Sunny Cloudy Rainy
Emission Probability:
{Shop={Rainy=0.0, Cloudy=0.5, Sunny=0.5},
Walk={Rainy=0.1, Cloudy=0.4, Sunny=0.5},
Clean={Rainy=0.55, Cloudy=0.35, Sunny=0.1}}
hmm.a[0][0] = 0.5;
hmm.a[0][1] = 0.5;
hmm.a[1][0] = 0.5;
hmm.a[1][1] = 0.5;
hmm.b[0][0] = 0.25;
hmm.b[0][1] = 0.25;
hmm.b[0][2] = 0.25;
hmm.b[0][3] = 0.25;
hmm.b[1][0] = 0.25;
hmm.b[1][1] = 0.25;
hmm.b[1][2] = 0.25;
hmm.b[1][2] = 0.25;