hmmlearn
Hidden Markov Models in Python with scikit-learn like API
Decision gist · record as of 2026-08-14
Yes, if you need unsupervised HMM modeling and can accept dormant maintenance. The package is stable, has no known vulnerabilities, and the scikit-learn API integration is well-established. Install friction is moderate (C compiler required) but manageable. Best suited for research, prototyping, or production systems where HMM is the right model and you don't expect active feature development.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a C compiler and Python development headers to build from source; prebuilt wheels are available for Python 3.10–3.13 on common platforms.
- Medium install friction due to C compiler requirement.
- Package is in dormant maintenance status with last release 652 days ago, though the repository remains active and the codebase is stable.
License · maintenance · safety
permissive license (permissive) — BSD permissive license allows commercial and private use with minimal restrictions.
last release 2024-10-31 (652 days) · last repo commit 2024-10-31 · 3,413 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,269,719 downloads/mo, #4,129 on PyPI
Alternatives
Verify before relying
pip install hmmlearn
import numpy as np
from hmmlearn import hmm
model = hmm.GaussianHMM(n_components=3)
model.fit(X)
hidden_states = model.predict(X)- Whether the 652-day gap since last release reflects active maintenance or abandonment risk
- Current state of C compiler compatibility across modern build environments
- Whether scipy is a runtime dependency (listed as runtime but not explicitly documented)
What it is and what it does
hmmlearn provides a suite of algorithms for training and using Hidden Markov Models without labeled data. It wraps the mathematical machinery of HMM inference—forward-backward algorithms, Viterbi decoding, and parameter estimation—behind a scikit-learn-style interface, so if you've used scikit-learn's fit/predict pattern, the API will feel familiar. The package depends on numpy, scikit-learn, and scipy for its numerical and statistical foundations.
Typical use involves fitting an HMM to sequence data (like time series or biological sequences) to learn the underlying state structure, then using that model to decode hidden states or generate predictions. It's built for research and production work on sequence modeling tasks where you don't have ground-truth labels for the states themselves.
Use it for
- Train HMM models on unlabeled time-series data to discover hidden state patterns in sensor readings or financial data.
- Decode the most likely sequence of hidden states given observed data using Viterbi algorithm.
- Model biological sequences (DNA, protein) where true state labels are unknown but state transitions follow Markovian structure.
- Estimate transition and emission probabilities from sequence data for downstream inference tasks.
- Prototype sequence modeling experiments before moving to more complex approaches.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need unsupervised HMM modeling and can accept dormant maintenance.
The package is stable, has no known vulnerabilities, and the scikit-learn API integration is well-established. Install friction is moderate (C compiler required) but manageable. Best suited for research, prototyping, or production systems where HMM is the right model and you don't expect active feature development.
Install
hmmlearn on PyPI
Before you install
Medium install friction due to C compiler requirement. Package is in dormant maintenance status with last release 652 days ago, though the repository remains active and the codebase is stable.
Requires a C compiler and Python development headers to build from source; prebuilt wheels are available for Python 3.10–3.13 on common platforms.
License in practice
BSD permissive license allows commercial and private use with minimal restrictions.
Quickstart
pip install hmmlearn
import numpy as np
from hmmlearn import hmm
model = hmm.GaussianHMM(n_components=3)
model.fit(X)
hidden_states = model.predict(X)
Verify before relying
- Whether the 652-day gap since last release reflects active maintenance or abandonment risk
- Current state of C compiler compatibility across modern build environments
- Whether scipy is a runtime dependency (listed as runtime but not explicitly documented)
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 3 packagesnumpyscikit-learnscipy |
| Maintenance | Dormant 652 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,269,719 / month, #4,129 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: Scientific/EngineeringTopic :: Software Development |
Evidence: hmmlearn-0.3.3-cp310-cp310-macosx_10_9_universal2.whl; hmmlearn-0.3.3-cp310-cp310-macosx_10_9_x86_64.whl; hmmlearn-0.3.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; hmmlearn-0.3.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; hmmlearn-0.3.3-cp310-cp310-win_amd64.whl; hmmlearn-0.3.3-cp311-cp311-macosx_10_9_universal2.whl; hmmlearn-0.3.3-cp311-cp311-macosx_10_9_x86_64.whl; hmmlearn-0.3.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; hmmlearn-0.3.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; hmmlearn-0.3.3-cp311-cp311-win_amd64.whl; hmmlearn-0.3.3-cp312-cp312-macosx_10_9_universal2.whl; hmmlearn-0.3.3-cp312-cp312-macosx_10_9_x86_64.whl; hmmlearn-0.3.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; hmmlearn-0.3.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; hmmlearn-0.3.3-cp312-cp312-win_amd64.whl; hmmlearn-0.3.3-cp313-cp313-macosx_10_13_universal2.whl; hmmlearn-0.3.3-cp313-cp313-macosx_10_13_x86_64.whl; hmmlearn-0.3.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; hmmlearn-0.3.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; hmmlearn-0.3.3-cp313-cp313-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “hidden markov models python”
- hmmlearnhmmlearn implements unsupervised learning and inference algorithms…
- pyhmmerPyHMMER provides Python bindings to HMMER3, a biological sequence…
- quanteconQuantEcon provides computational tools and algorithms for…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also pyhmmer · scikit-learn · pymc3 · emcee · scikit-learn-extra · skforecast · sklearn-crfsuite · soynlp · statsmodels · pgmpy