fit-hidden-markov-model

Installation
SKILL.md

Fit Hidden Markov Model

Fit a hidden Markov model (HMM) to sequential observation data using the Baum-Welch expectation-maximization algorithm, decode the most likely hidden state sequence via Viterbi, and select the optimal number of hidden states through information criteria.

When to Use

  • You observe a sequence of emissions but the underlying generative states are not directly observable
  • You suspect your data is generated by a system that switches between a finite number of regimes
  • You need to segment a time series into latent phases (e.g., market regimes, speech phonemes, biological sequence annotation)
  • You want to compute the probability of an observed sequence under a generative model
  • You need the most likely sequence of hidden states given observations (decoding)
  • You are comparing models with different numbers of hidden states for the best complexity-fit trade-off

Inputs

Required

Input Type Description
Related skills
Installs
1
GitHub Stars
13
First Seen
Mar 18, 2026