Fit Hidden Markov Model
Fit hidden Markov models using the Baum-Welch (EM) algorithm with model selection, Viterbi decoding for state sequences, and forward-backward probabilities. Use when observations are generated by unobservable latent states, you need to segment a time series into latent regimes (market regimes, speech phonemes, biological sequences), compute sequence probabilities, decode the most likely hidden state path, or compare models with different numbers of hidden states.
Install
npx skills add pjt222/agent-almanac --skill fit-hidden-markov-modelgit clone --depth 1 https://github.com/pjt222/agent-almanac.git /tmp/agent-almanac
mkdir -p ~/.claude/skills
cp -r /tmp/agent-almanac/i18n/caveman-lite/skills/fit-hidden-markov-model ~/.claude/skills/fit-hidden-markov-modelPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the 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 | |---|---|---| | `observations` | sequence/matrix | Observed data sequence (univariate or multivariate) | | `n_hidden_states` | integer | Number of hidden states to fit (or a range for model selection) | | `emission_type` | string | Distribution family for emissions: `"gaussian"`, `"discrete"`, `"poisson"`, `"multinomial"` | ### Optional | Input | Type | Default | Description | |---|---|---|---| | `initial_params` | dict | random/heuristic | Initial transition matrix, emission parameters, and start probabilities |
Details
- Skill name
fit-hidden-markov-model- Repository
- pjt222/agent-almanac
- Path
i18n/caveman-lite/skills/fit-hidden-markov-model/SKILL.md- License
- MIT
- Repo updated
- 18 November 2026
- Listed in
- BehiSecc/awesome-claude-skills
FAQ
What does the Fit Hidden Markov Model skill do?
Fit hidden Markov models using the Baum-Welch (EM) algorithm with model selection, Viterbi decoding for state sequences, and forward-backward probabilities. Use when observations are generated by unobservable latent states, you need to segment a time series into latent regimes (market regimes, speech phonemes, biological sequences), compute sequence probabilities, decode the most likely hidden state path, or compare models with different numbers of hidden states.
How do I install the Fit Hidden Markov Model skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add pjt222/agent-almanac --skill fit-hidden-markov-model. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Fit Hidden Markov Model popular?
It lives in pjt222/agent-almanac, which has 45 GitHub stars and 4 forks, and is included in 1 curated skill list.
Related skills
Adapt Architecture
45pjt222/agent-almanac
Execute structural metamorphosis using strangler fig migration, chrysalis phases, and interface preservation. Covers transformation planning, parallel running, progressive cutover, rollback design, and post-metamorphosis stabilization for system architecture evolution. Use when assess-form has classified the system as READY for transformation, when migrating from monolith to microservices, when replacing a core subsystem while dependents continue operating, or when any architectural change must be gradual rather than big-bang.
Adaptic
45pjt222/agent-almanac
Master skill composing the 5-step synoptic cycle for panoramic synthesis across multiple domains. Orchestrates meditate, expand-awareness, observe, awareness, integrate-gestalt, and express-insight into a coherent process that produces unified understanding rather than sequential compromise. Use when a problem genuinely spans 3+ domains and the interactions between domains matter more than depth in any one, when sequential analysis feels like compromise rather than integration, or before major architectural decisions affecting multiple stakeholders.
Add Puzzle Type
45pjt222/agent-almanac
Scaffold a new puzzle type across all 10+ pipeline integration points in jigsawR. Creates the core puzzle module, wires it into the unified pipeline (generation, positioning, rendering, adjacency), adds ggpuzzle geom/stat layers, updates DESCRIPTION and config.yml, extends the Shiny app, and creates a comprehensive test suite. Use when adding a completely new puzzle type to the package or following the 10-point integration checklist to ensure nothing is missed end-to-end.
Honesty Humility
45pjt222/agent-almanac
Epistemic transparency — acknowledging uncertainty, flagging limitations, avoiding overconfidence, and communicating what is known, unknown, and uncertain with proportional confidence. Maps the HEXACO personality dimension to AI reasoning: truthful calibration of confidence, proactive disclosure of gaps, and resistance to the temptation to appear more certain than warranted. Use before presenting a conclusion, when answering questions where knowledge is partial or inferred, after noticing a temptation to state uncertain information as certain, or when a user is making decisions based on provid
Fit Drift Diffusion Model
45pjt222/agent-almanac
Fit cognitive drift-diffusion models (Ratcliff DDM) to reaction time and accuracy data with parameter estimation (drift rate, boundary separation, non-decision time), model comparison, and parameter recovery validation. Use when modeling binary decision-making with reaction time data, estimating cognitive parameters from experimental data, comparing sequential sampling model variants, or decomposing speed-accuracy tradeoff effects into latent cognitive components.
Implement A2a Server
45pjt222/agent-almanac
Implement a JSON-RPC 2.0 A2A server with full task lifecycle management (submitted/working/completed/failed/canceled/input-required), SSE streaming, and push notifications. Use when implementing an agent that participates in multi-agent A2A workflows, building a backend for an Agent Card, adding A2A protocol support to an existing agent or service, or deploying an agent that must interoperate with other A2A-compliant agents.
Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.