Hidden Markov Models CISC 5800 Professor Daniel Leeds
Representing sequence data Spoken language DNA sequences Daily stock values Example: spoken language F?r plu? fi?e is nine Between F and r expect a vowel: “aw”, “ee”, “ah”; NOT “oh”, “uh” At end of “plu” expect consonant: “g”, “m”, “s”; NOT “d”, “p” 2
Markov Models
A dice-y example Two colored die What is the probability we start at s A ? What is the probability we have the sequence of die choices: s A, s A ? What is the probability we have the sequence of die choices: s B, s A, s B, s A ? 4
A dice-y example What is the probability we have the sequence of die choices: s B, s A, s B, s A ? Dynamic programming: find answer for q t, then compute q t+1 5 State\Timet1t1 t2t2 t3t3 sAsA 0.3 sBsB 0.7
Hidden Markov Models 6 Q O A A A
Deducing die based on observed “emissions” Each color is biased A (red)B (blue) We see: 5What is probability of o=5 | B (blue) We see: 5, 3What is probability of o=5,3 | B, B? What is probability of o=5,3 and s=B,B What is MOST probable s | o=5,3? 7 oP(o|s A )P(o|s B )
Goal: calculate most likely states given observable data 8
9
Parameters in HMM 10 How do we learn these values?
First, assume we know the states 11
Learning HMM parameters: A i,j First, assume we know the states 12
First, assume we know the states 13
Challenges in HMM learning 14
Expectation-Maximization, or “EM” 15
Computing states q t 16
Details of forward and backward probabilities 17
E-step: State probabilities 18
Recall: when states known 19
M-step 20
Review of HMMs in action 21 For classification, find highest probability class given features Features for one sound: [q 1, o 1, q 2, o 2, …, q T, o T ] Conclude word: Generates states: Q O sound1sound2 sound3