-
Notifications
You must be signed in to change notification settings - Fork 30
Support for non-homogeneous hidden Markov models #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… error on EM failure
…ts, faster update and fill time
…leaves data and model example data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request introduces support for non-homogeneous HMMs by adding new model classes and updating visualization, post‑estimation functions, and testing workflows.
- Updated NEWS.md to document new NHMM and related model features
- Modified GitHub Actions workflows to add branch filters for “nhmm” and update action versions and environment variables
- Improved coverage tests with additional package dependencies and configuration adjustments
Reviewed Changes
Copilot reviewed 301 out of 318 changed files in this pull request and generated no comments.
File | Description |
---|---|
NEWS.md | Added release notes for seqHMM 2.0.0 with detailed bullet points summarizing new features |
.github/workflows/test-coverage.yaml | Updated branch filters, action versions, additional dependencies, and test coverage steps |
.github/workflows/R-CMD-check.yaml | Adjusted branch filters and environment variables; still uses an older checkout version compared to test-coverage |
Files not reviewed (17)
- .Rbuildignore: Language not supported
- .covrignore: Language not supported
- DESCRIPTION: Language not supported
- Examples/mixhmmexample.R: Language not supported
- Examples/seqHMMexample.R: Language not supported
- NAMESPACE: Language not supported
- R/HMMplot.R: Language not supported
- R/RcppExports.R: Language not supported
- R/SSPlotter-deprecated.R: Language not supported
- R/biofam3c.R: Language not supported
- R/bootstrap.R: Language not supported
- R/build_fanhmm.R: Language not supported
- R/build_hmm.R: Language not supported
- R/build_lcm.R: Language not supported
- R/build_mm.R: Language not supported
- R/build_mmm.R: Language not supported
- R/build_mnhmm.R: Language not supported
Comments suppressed due to low confidence (1)
.github/workflows/R-CMD-check.yaml:36
- [nitpick] For consistency with the test-coverage workflow which uses actions/checkout@v4, consider updating the checkout action to v4 in this file.
- uses: actions/checkout@v3
This is a major update to
seqHMM
. New models of classnhmm
,mnhmm
, andfanhmm
(inheriting fromnhmm
) support covariates in initial, transition and emission probabilities. In addition, visualizations are now based onggplot2
graphics (with the help ofggseqplot
), and post-estimation functions such asposterior_probs
return data frames (data.table
actually).From
NEWS
:bootstrap_coef
bootstrapping coefficients of NHMMs.predict
, which can be used to compute average marginal predictions for NHMMs, which can be interpreted as average causal effects under suitable assumptions (https://arxiv.org/abs/2503.16014).get_*
functions for obtaining initial, transition, emission and cluster probabilities and their (conditional) marginals.hidden_paths
andforward_backward
so that they returndata.table
.stslist_to_data
anddata_to_stslist
to convert between data frames and TraMineR'sstslist
objects (created byseqdef
).ggseqplot
andpatchwork
packages. Old plotting functions are deprecated and will be removed in the future.cli
package.estimate_coef
. A portion of the code was accidentally commented out, rendering the function non-functional for several years. Rather than correcting the code, the function was removed as it was deemed unnecessary.testthat
package.Some things are still missing, at least:
hmm
, new models do not support constraints in emission or transition matrices. These are tricky in general, but we could have separate model class for left-to-right models as well as pure (mixture) Markov models.