13
Hidden Markov Models Hidden Markov Models ADVANCED BIOMETRIC ADVANCED BIOMETRIC MEVLANA UNIVERSITY, KONYA MEVLANA UNIVERSITY, KONYA Presented Presented By By Muzammil Abdulrahman Muzammil Abdulrahman 2013 2013

HIDDEN MARKOV MODEL AND ITS APPLICATION

Embed Size (px)

DESCRIPTION

HIDDEN MARKOV MODEL AND ITS APPLICATIONS

Citation preview

Page 1: HIDDEN MARKOV MODEL AND ITS APPLICATION

Hidden Markov ModelsHidden Markov Models

ADVANCED BIOMETRICADVANCED BIOMETRIC

MEVLANA UNIVERSITY, KONYAMEVLANA UNIVERSITY, KONYA

Presented Presented

ByBy

Muzammil AbdulrahmanMuzammil Abdulrahman

20132013

Page 2: HIDDEN MARKOV MODEL AND ITS APPLICATION

HMM MotivationHMM Motivation Real-world has structures and processes which Real-world has structures and processes which

have (or produce) observable outputshave (or produce) observable outputs

Usually sequential (process unfolds over time)Usually sequential (process unfolds over time) Cannot see the event producing the outputCannot see the event producing the output

Example: speech signalsExample: speech signals

Problem: how to construct a model of the Problem: how to construct a model of the structure or process given only observationsstructure or process given only observations

Page 3: HIDDEN MARKOV MODEL AND ITS APPLICATION

Markov ModelMarkov Model

The future is independent on the past given the The future is independent on the past given the presentpresent

Let be discrete random Let be discrete random variables of states, then the Markov chain can be variables of states, then the Markov chain can be represented as represented as

… …

1 2, ...... nX X X

1X nX3X2X

1 2 1 1( | , , , ) ( | )t t t tP X X X X P X X− −=K

Page 4: HIDDEN MARKOV MODEL AND ITS APPLICATION

Markov Model ExampleMarkov Model Example

WeatherWeather Once each day weather is observedOnce each day weather is observed

State 1: rainState 1: rain State 2: cloudyState 2: cloudy State 3: sunnyState 3: sunny

What is the probability the weather for What is the probability the weather for the next 7 days will be:the next 7 days will be:

sun, sun, rain, rain, sun, cloudy, sunsun, sun, rain, rain, sun, cloudy, sun

Each state corresponds to a physical Each state corresponds to a physical observable eventobservable event

State transition matrix

RainyRainy CloudyCloudy SunnySunny

RainyRainy 0.40.4 0.30.3 0.30.3

CloudyCloudy 0.20.2 0.60.6 0.20.2

SunnySunny 0.10.1 0.10.1 0.80.8

Page 5: HIDDEN MARKOV MODEL AND ITS APPLICATION

MMMM

Then What is the Problem of MM ?Then What is the Problem of MM ? Some informations will be missing Some informations will be missing Why ??Why ?? We can’t expect to perfectly observe the We can’t expect to perfectly observe the

complete states of the systems complete states of the systems

Page 6: HIDDEN MARKOV MODEL AND ITS APPLICATION

HMM HMM The solution to the missing informations will be solve by HMMThe solution to the missing informations will be solve by HMM It’s a Sequential ModelIt’s a Sequential Model Let be a hidden random variables and Let be a hidden random variables and

be the observed states be the observed states

1 2, ...... nZ Z Z

1 2, ...... nX X X

1X nX3X2X

1Z nZ3Z2Z

The Trellis Diagram of HMM The Trellis Diagram of HMM

Page 7: HIDDEN MARKOV MODEL AND ITS APPLICATION

HMMHMM

The joined prob. of the above variables isThe joined prob. of the above variables is

1 1 1 1 12( ... , , , ) ( ) ( / ) ( / ) ( / )nt n n k k k kkp X X Z Z p Z p X Z p Z Z p X Zπ −==K

Page 8: HIDDEN MARKOV MODEL AND ITS APPLICATION

HMM ParametersHMM Parameters

Transition probs.Transition probs. Emission probs.Emission probs. Initial DistributionInitial Distribution

Xs are the hidden statesXs are the hidden states Ys are the observed statesYs are the observed states a’s are the Transition probs.a’s are the Transition probs. b’s are the emission probs.b’s are the emission probs. The initial prob is sometimes assumed to be 1The initial prob is sometimes assumed to be 1

Page 9: HIDDEN MARKOV MODEL AND ITS APPLICATION

• Typed word recognition, assume all characters are separated.

• Character recognizer outputs probability of the image being particular character, P(image|character).

0.5

0.03

0.005

0.31z

c

b

a

HMM ExamplesHMM Examples

Hidden state Observation

Page 10: HIDDEN MARKOV MODEL AND ITS APPLICATION

HMM ExamplesHMM Examples

Coin toss: Coin toss: Heads, tails sequence with 2 coinsHeads, tails sequence with 2 coins You are in a room, with a wallYou are in a room, with a wall Person behind wall flips coin, tells resultPerson behind wall flips coin, tells result

Coin selection and toss is Coin selection and toss is hiddenhidden Cannot observe events, only output (heads, tails) from Cannot observe events, only output (heads, tails) from

eventsevents

Problem is then to build a model to explain Problem is then to build a model to explain observed sequence of heads and tailsobserved sequence of heads and tails

Page 11: HIDDEN MARKOV MODEL AND ITS APPLICATION

HMM UsesHMM Uses UsesUses

Speech recognitionSpeech recognition

Text processingText processing

Gesture classificationsGesture classifications

BioinformaticsBioinformatics

Page 12: HIDDEN MARKOV MODEL AND ITS APPLICATION

HMM AlgorithmsHMM Algorithms

They are used to do the inference on Zs given They are used to do the inference on Zs given the sequences of the observed actions the sequences of the observed actions

The ff algorithms are used in HMMThe ff algorithms are used in HMM ForwardForward BackwardBackward ViterbiViterbi

1 2, ...... nX X X

Estimate the Parameters of HMM (T, E & I) using Baum Welch

Page 13: HIDDEN MARKOV MODEL AND ITS APPLICATION

Thank You Thank You