Unit - 4 Hidden Markov Models
Unit - 4 Hidden Markov Models
Unit - 4 Hidden Markov Models
• In a first-order Markov chain, the current state depends only on the previous state
• First-order Markov chain is described as each observation being independent of all
previous observations except the most recent.
• Example: Predicting weather based on whether it rained the day before.
Higher Order Markov Chain
• Form of Messages: In the Hidden Markov Model, the propagated messages follow the
structure derived from these general results
Recursion for the messages of the form:
Messages that are propagated from the root node back to the leaf node
• The sum-product algorithm also specifies how to evaluate the marginals once all
the messages have been evaluated
Scaling Factor
• In Hidden Markov Models (HMMs), the forward-backward algorithm suffers from numerical
underflow because the forward variable involves multiplying small probabilities, causing values to
shrink exponentially.
In order to relate the scaled and original alpha variables, we introduce scaling factors defined by conditional
distributions over the observed variables
From the product rule, we then have
and so
We can then turn the recursion equation for into one for given by
The recursion result for then gives the following recursion for the re-scaled variables
In applying this recursion relation, we make use of the scaling factors that were previously computed
in the phase
Similarly, using the given equations together we see that the required marginals are given by
The Viterbi algorithm
The Viterbi algorithm is used to find the most probable sequence of hidden
states in Hidden Markov Models (HMMs) for a given observation sequence.
It efficiently identifies the best path through the state space, crucial in
applications like speech recognition.
•The Viterbi algorithm employs the max-sum algorithm, working with log
probabilities, which eliminates the need for re-scaling.
•HMMs can be represented as a factor graph, and messages are passed from
leaf nodes to the root.
• A fragment of the HMM lattice showing two possible paths. The Viterbi algorithm efficiently determines the
most probable path from amongst the exponentially many possibilities.
• For any given path, the corresponding probability is given by the product of the elements of the transition
matrix , corresponding to the probabilities for each segment of the path, along
with the emission densities associated with each node on the path.
Max-Sum Message Passing
Initialization of Messages
The Viterbi algorithm efficiently computes the most probable sequence of hidden
states by maintaining only the best paths, reducing the computational cost from
exponential to linear with respect to the length of the sequence.
Linear Dynamical Systems
Inference in LDS
Learning in LDS
Extensions of LDS
Particle filters