Hidden Markov Models (HMM)
Hidden Markov Model (HMM)
- reading prerequisite: Markov Chains
HMM is an extension of Markov Chains where the state-values are NOT fully observable
- HMMs are also considered as:
- a type of probabilistic graphical model
- an extension of Naive Bayes Models that model sequences
- the simplest Dynamic Bayesian Network
- a sequential supervised, generative model
HMM - Intuition & Components
- HMM is an extension of Markov Chains where the states are NOT fully observable. In other words, each state-value is decomposed into 2 parts:
- 1 hidden-state 𝑌 - each hidden-state can have 1 of 𝑛 possible hidden-state-values {𝑠1, ..., 𝑠𝑛}
- 1 observable-state 𝑋 - each observable-state can have 1 of 𝑚 possible observable-state-values {𝑥1, ..., 𝑥𝑚}
- at current time 𝑡 the HMM is at some hidden-state-value 𝑠(𝑡). This 𝑠(𝑡) is 1 of the 𝑛 possible hidden-state-values {𝑠1, ..., 𝑠𝑛}
- 𝑠(𝑡) = 𝑠𝑖 # where 𝑠𝑖∊{𝑠1, ..., 𝑠𝑛}
- this is denoted as 𝑌(𝑡)=𝑠(𝑡)=𝑠𝑖 # these 2 ways to represent the state-value of 𝑌(𝑡) will be useful as we go on
- as the HMM moves to time 𝑡+1, it RANDOMLY chooses the next hidden-state-value 𝑠(𝑡+1) denoted as:
- 𝑌(𝑡+1)=𝑠(𝑡+1)=𝑠?
- based on the chosen 𝑠(𝑡+1) the HMM also RANDOMLY chooses an observable-state-value 𝑥(𝑡+1) denoted as:
- 𝑋(𝑡+1)=𝑥(𝑡+1)=𝑥?
- 𝑋(𝑡+1)=𝑥(𝑡+1)=𝑥?
- naturally this forms a sequence of (𝑋,𝑌) pairs as time progresses:
- { ..., (𝑋(𝑡-1),𝑌(𝑡-1)), (𝑋(𝑡),𝑌(𝑡)), ...}
- the sequence of (𝑋,𝑌) pairs is the "recorded history" of state-values over time. However the only values we observe are the 𝑋s not 𝑌s
- this sequence can grow infinitely long
- the 𝑌s and 𝑋s are called time-variables, where:
- each 𝑌 holds 1 hidden-state-value 𝑠?
- each 𝑋 holds 1 observable-state-value 𝑥?
HMM - Required Components (State Transition Matrix & Emission Matrix)
HMM - Optional Components (Starting State Probabilities & Ending State Probabilities)
HMM - Visual/Graphical Representations
HMM - Training/Learning
- given an observation sequence or set of observation sequences, learn the components of the 𝐻𝑀𝑀
training a 𝐻𝑀𝑀 means to learn the following probabilities:
- state transition matrix/function: 𝐏𝑡𝑟𝑎𝑛𝑠(𝑌(𝑡)=𝑠?|𝑌(𝑡-1)=𝑠?)
- emission matrix/function: 𝐏𝑒𝑚𝑖𝑠𝑠(𝑋=𝑥?|𝑌=𝑠?)
- starting state probabilities: 𝐏𝑠𝑡𝑎𝑟𝑡(𝑌(1)=𝑠?) # optional
- ending state probabilities: 𝐏𝑒𝑛𝑑(𝑌(𝑇)=𝑠?) # optional
- methods in learning the probabilities:
HMM - Inference Problems
all inference problems can be solved via HMM - Inference By Enumeration & Variable Elimination
Likelihood Problem 1 |
|
---|---|
Likelihood Problem 2 |
|
Likelihood Problem 3 |
|
Likelihood Problem 4 |
|
Decoding Problem |
|