Top Banner
HIDDEN MARKOV MODEL Presented by: - Vo Quang Tuyen - Le Quang Hoa - Truong Hoang Linh Problem 2 MOST PROBABLE PATH
18

Hidden Markov Model - The Most Probable Path

Jun 28, 2015

Download

Science

Lê Hòa

Hidden Markov Model - The Most Probable Path
Viterbi Algorithm
Machine learning
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Hidden Markov Model - The Most Probable Path

HIDDEN MARKOV MODEL

Presented by: - Vo Quang Tuyen- Le Quang Hoa- Truong Hoang Linh

Problem 2

MOST PROBABLE PATH

Page 2: Hidden Markov Model - The Most Probable Path

Markov Models

A Markov Model is specified by

The set of states S = {s1, s2, …. , sNs}. and characterized by

The prior probabilities:

Probabilities of si being the first state of a state sequence. Collected in vector .

The transition probabilities ai j = P(qn+1 = sj | qn = si)

probability to go from state i to state j. Collected in matrix A

The Markov model produces

A state sequence Q = {q1,….qN}, qn S over time

Page 3: Hidden Markov Model - The Most Probable Path

Hidden Markov Models

Additionally, for a Hidden Markov model we have

Emission probabilities:

for continuous valued observations, . A set of functions:

for discrete observations,

bi,k = P(xn = vk | qn = si )

Probabilities for the observation of xn = vk, if the system is in state si.

Collected in matrix B.

Observation sequence: X = { x1, x2, …., xN}

HMM parameters (for fixed number of states Ns) thus are

Page 4: Hidden Markov Model - The Most Probable Path

Trellis Diagram

A trellis diagram can be used to visualize likelihood calculations of HMMs.

Page 5: Hidden Markov Model - The Most Probable Path

Trellis Example

Joint likelihood for observed sequence X and state sequence (path) Q:

Example for Trellis diagram:

Page 6: Hidden Markov Model - The Most Probable Path

Hidden Markov Models Problem

Given model , what is the hidden state sequence Q that best explains an observation sequence X

𝑄∗=𝑎𝑟𝑔𝑚𝑎𝑥 𝑃 ( 𝑋 ,𝑄|Θ¿=?𝑄

Page 7: Hidden Markov Model - The Most Probable Path

Viterbi Algorithm

for a HMM with states.

1. Initialization: ,

where πi is the prior probability of being in state si at time n = 1

2. Recursion:

for n > 1 and all j = 1 ...

Page 8: Hidden Markov Model - The Most Probable Path

Viterbi Algorithm

3. Termination:

Find the best likelihood when the end of the observation sequence t = T is reached.

4. Backtracking of optimal state sequence:

Read the best sequence of states from the vectors.

Page 9: Hidden Markov Model - The Most Probable Path

Viterbi Algorithm / Example

For our weather HMM ,find the most probable hidden weather sequence for the observation sequence

Page 10: Hidden Markov Model - The Most Probable Path

Viterbi Algorithm / Example

1. Initialization (n=1):

Page 11: Hidden Markov Model - The Most Probable Path

Viterbi Algorithm / Example

2. Recursion (n=2):

We calculate the likelihood of getting to state “sunny” from all possible 3 redecessor states, and choose the most likely one to go on with:

The likelihood is stored in , the most likely predecessor in .The same procedure is executed with states “rainy” and “foggy”:

Page 12: Hidden Markov Model - The Most Probable Path

Viterbi Algorithm / Example

Page 13: Hidden Markov Model - The Most Probable Path

Viterbi Algorithm / Example

Recursion (n = 3):

Page 14: Hidden Markov Model - The Most Probable Path

Viterbi Algorithm / Example

Page 15: Hidden Markov Model - The Most Probable Path

Viterbi Algorithm / Example

3. Termination

The globally most likely path is determined, starting by looking for the last state of the most likely sequence.

4. BacktrackingThe best sequence of states can be read from the vectors.

n = N – 1 = 2:

n = N – 1 = 1:

Page 16: Hidden Markov Model - The Most Probable Path

Viterbi Algorithm / Example

The most likely weather sequence is:

Backtracking:

Page 17: Hidden Markov Model - The Most Probable Path

HIDDEN MARKOV MODELS

ANY QUESTION ?

Page 18: Hidden Markov Model - The Most Probable Path

REFERENCE

- Hidden Markov Models - A Tutorial for the Course Computational Intelligence, Barbara Resch.

- Hidden Markov Models, Speech Communication 2, SS 2004 , Erhard Rank & Franz Pernkopf