Conversation
… error on EM failure
…ts, faster update and fill time
…leaves data and model example data
There was a problem hiding this comment.
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 onggplot2graphics (with the help ofggseqplot), and post-estimation functions such asposterior_probsreturn data frames (data.tableactually).From
NEWS:bootstrap_coefbootstrapping 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_pathsandforward_backwardso that they returndata.table.stslist_to_dataanddata_to_stslistto convert between data frames and TraMineR'sstslistobjects (created byseqdef).ggseqplotandpatchworkpackages. Old plotting functions are deprecated and will be removed in the future.clipackage.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.testthatpackage.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.