RepositoryRFIFinland
helske

helske/seqHMM

Multivariate and Multichannel Discrete Hidden Markov Models for Categorical Sequences

106stars
31forks
11issues
2views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: categorical-data

#1 Repository of the month

1
TINIX TRENDING·Topic: em-algorithm

#1 Repository of the month

1
TINIX TRENDING·Topic: hidden-markov-models

#1 Repository of the month

R-CMD-check Codecov test coverage cran version downloads

seqHMM: Hidden Markov Models for Life Sequences and Other Multivariate, Multichannel Categorical Time Series

The seqHMM package is designed for fitting hidden (latent) Markov models (HMMs) and their variations for social sequence data and other categorical sequence data (e.g. categorical time series and panel data). Restricted and extended variants include mixture HMMs, Markov models and their mixtures, latent class models, non-homogeneous hidden Markov models (NHMMs) and their mixtures, and feedback-augmented hidden Markov models (FAN-HMMs).

The package supports models for one or multiple subjects with one or multiple parallel outcome sequences (channels). External covariates can be added to explain cluster membership in mixture models, and NHMMs and their variants support covariates in initial, transition and emission matrices as well.

Maximum likelihood estimation via EM algorithm and direct numerical maximization with analytical gradients is supported. All main algorithms are written in C++. Parallel computation is available via OpenMP (pre-2.0.0 version models) and future (via parallel multistart estimation with random initial values).

When using the package in publications, please cite:

Helske, Satu and Helske, Jouni (2019). Mixture hidden Markov models for sequence data: the seqHMM package in R. Journal of Statistical Software, 88(3). doi:10.18637/jss.v088.i03.

Helske, Jouni (2025). Feedback-augmented Non-homogeneous Hidden Markov Models for Longitudinal Causal Inference. arXiv preprint. doi:10.48550/arXiv.2503.16014.

If you find bugs, please add a new issue here in GitHub. You can also contact Satu Helske (firstname.lastname@utu.fi) or Jouni Helske (firstname.lastname@iki.fi). We would be happy to hear your feedback.

The package is available on CRAN. Install it via

install.packages("seqHMM")

If you want to try the development version of the seqHMM package, install it from the R-universe:

install.packages("seqHMM", repos = "https://helske.r-universe.dev")

Similar Projects

Discover other similar projects and AI models.

RepositoryJupyter Notebook
microsoft/ML-For-Beginners

12 weeks, 26 lessons, 52 quizzes, classic Machine Learning for all

92.5k
Nov 7, 2026
RepositoryC
redis/redis

For developers, who are building real-time data-driven applications, Redis is the preferred, fastest, and most feature-rich cache, data structure server, and document and vector query engine.

77.9k
Dec 1, 2026
RepositoryGo
prometheus/prometheus

The Prometheus monitoring system and time series database.

68.1k
Dec 2, 2026
RepositoryPython
public-apis/public-apis

A collective list of free APIs

502.6k
Nov 30, 2026
RepositoryTypeScript
openclaw/openclaw

The AI that really does things. Any OS. Any Platform. The lobster way. 🦞

395.6k
Dec 2, 2026
Repository
jwasham/coding-interview-university

A complete computer science study plan to become a software engineer.

365.2k
Nov 7, 2026
RepositoryPython
TheAlgorithms/Python

All Algorithms implemented in Python

226.6k
Nov 13, 2026
RepositoryTypeScript
firecrawl/firecrawl

Firecrawl is the knowledge infrastructure to make your agents smarter. It connects your agents to the web, and to Alexandria, our library of everything else.

215.1k
Dec 2, 2026
RepositoryJavaScript
trekhleb/javascript-algorithms

📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings

196.8k
Jul 26, 2026