Hidden Markov Model (HMM)
First Principles Question
If you can only observe symptoms, can you infer what underlying state caused them?
The Core Idea
The world is in some state you can’t directly see (hidden). That state generates observations you can see. The state at the next step depends only on the current state (Markov property). Given a sequence of observations, HMM lets you: evaluate its likelihood, decode the most likely hidden state sequence, and learn the model parameters.
The Math
Hidden states: S = {s₁, s₂, ..., sₙ}
Observations: O = {o₁, o₂, ..., oₜ}
Three parameters:
π = initial state distribution P(state at t=0)
A = transition matrix P(next state | current state)
B = emission matrix P(observation | hidden state)
Three problems:
1. Evaluation: P(O | λ) → Forward algorithm
2. Decoding: best state seq → Viterbi algorithm
3. Learning: estimate π,A,B → Baum-Welch (EM algorithm)
The Markov Property
P(state at t+1 | all past states) = P(state at t+1 | state at t) The future depends only on the present, not the history. This simplification makes computation tractable.
Where HMM Differs from Everything Else
Every other model on this list is discriminative — it models P(class | features) directly. HMM is generative — it models how the data was produced. This makes it powerful for sequential data: speech, gesture, EMG signals, DNA sequences.
Connection to Your Work
EMG signals for prosthetic hand control are sequential, non-stationary. HMMs have historically been used for gesture recognition from EMG before deep learning took over. Your NinaPro dataset work sits in exactly this domain.
Prerequisites
Probability & Distributions · Naive Bayes
Builds To
Conditional Random Fields (CRF), sequence models, speech recognition
Content Ideas
Obsidian note: “What if the world has hidden states? The intuition behind Hidden Markov Models.” X post: “HMMs ask: if you can only see symptoms, can you figure out the disease? That’s the whole idea.” GitHub: HMM for gesture classification on NinaPro EMG data — ties directly to your MNIT work