Sequence Clustering with Discrete-Output HMMs
Overview
Provides an implementation of a mixture of hidden Markov models (HMMs) for discrete sequence data in the Discrete Bayesian HMM Clustering (DBHC) algorithm. The DBHC algorithm is an HMM Clustering algorithm that finds a mixture of discrete-output HMMs while using heuristics based on Bayesian Information Criterion (BIC) to search for the optimal number of HMM states and the optimal number of clusters.
Bug fixes
cluster.bic()passes itsepsargument on tocount.parameters(), it always used the default threshold beforehmm.clust()passes itssmoothingargument on toassign.clusters(), cluster assignment always smoothed with the default beforesmooth.probabilities()returns a uniform distribution for a set of probabilities that are all zero, which used to stay zero and is then rejected bybuild_hmm()smooth.probabilities()no longer returns negative probabilities. Absolute discounting assumes the smoothing parameter is smaller than the smallest non-zero probability, and the amount discounted is now lowered to respect that. A probability below the parameter used to be discounted to a negative value, which survived because the row still sums to one, and grew more negative every time the model was smoothed again. Estimates for data with sparse emissions change, see below
Show all changes in 0.0.4Hide the rest of the changes in 0.0.4
select.seeds()stops with a message when too few sequences are left to fill a seed, it used to selectNAids- Loops over sequences and cluster models use
seq_along(), they could run an iteration on an empty set
Changes
- Sequences are evaluated against a cluster model all at once in
assign.clusters()andselect.seeds()instead of one at a time, which makes the algorithm about five times faster on 1000 sequences and leaves all results unchanged hmm.clust()has an argumentmax.iterandsize.search()has an argumentmax.statesto bound the search for cluster memberships and hidden states- An infeasible HMM raises a warning instead of printing one
- The smaller Swiss Household example is fast enough to run on test again
- Both Swiss Household examples are wrapped in
\donttestinstead of\dontrun, they are slow rather than impossible to run - Results for data with sparse emission probabilities change slightly because of the fix to
smooth.probabilities()above. On the simulation study of the accompanying paper nothing changes but the BIC, by 0.0001 percent. On the full Swiss Household data the cluster models and a small number of cluster memberships change, the number of clusters and their sizes do not
Maintenance
- Replaced
AuthorandMaintainerwithAuthors@R - Dropped
LazyData, the package has no data directory - Requires seqHMM (>= 2.0.0), the version this release is tested against
- Heatmaps refer to their data with the
.datapronoun, which silences the deprecation warnings from ggplot2
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-07-29
- NOTE11 OK, 2 NOTE2026-06-09
- ERROR11 OK, 1 NOTE, 1 ERROR2026-06-08
Show 1 earlier changeHide 1 earlier change
- NOTE12 OK, 2 NOTE2026-03-10
Documentation
- Help pages
- 13
- Examples that run
- 100%1 run in a plain check
- Exported functions with examples
- 8%
- Documented parameters
- 100%
- Return-value docs
- 85%
- Help pages citing references
- 0%
Downloads
Repository
Forks over time
Issues over time
Commits over time
4 development-tooling and community-health practices detected across 3 families in the upstream repository
Checks run against github.com/gabybudel/dbhc on 2026-10-21.
Dependencies
Installing DBHC adds 87 packages (49 with compiled code, 67 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, data.table 5.7 MB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 0.0.4Latest
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- unarchivedReturned to CRAN2022-12-22
- 0.0.32022-12-22 · diff ↗
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- archivedRemoved from CRAN2020-04-03check problems were not corrected in time Errors in '\donttest' parts of examples
- RR 3.6.0 released · 2019-04-26
- RR 3.5.0 released · 2018-04-23
- 0.0.22018-04-13
- RR 3.4.0 released · 2017-04-21
Package metadata
- First published
- 2018-04-13
- Total releases
- 3 / 8 yrs
- License
- GPL (>= 3) OSI
- Download size
- 19 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("DBHC")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.