Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
helske committed Sep 24, 2024
1 parent 75f496f commit ce09b3d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions R/coef.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ coef.mnhmm <- function(object, probs = c(0.025, 0.5, 0.975), ...) {
D <- object$n_clusters
gamma_pi_raw <- unlist(object$coefficients$gamma_pi_raw)
K_i <- length(object$coef_names_initial)
object$state_names <- unname(object$state_names)
gamma_pi <- data.frame(
state = unlist(lapply(object$state_names, function(x) x[-1])),
parameter = rep(object$coef_names_initial, each = (S - 1)),
Expand Down
2 changes: 1 addition & 1 deletion R/get_probs.R
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ get_emission_probs.mnhmm <- function(model, ...) {
state = model$state_names[[j]],
channel = model$channel_names[i],
observation = rep(symbol_names[[i]], each = S),
estimate = c(
estimate = unlist(
get_B_all(
model$coefficients$gamma_B_raw[[j]][[i]], model$X_emission,
FALSE, FALSE,attr(model, "tv_B")
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-forward_backward.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ test_that("'forward_backward' works for single-channel 'nhmm'", {
set.seed(1)
expect_error(
fit <- estimate_nhmm(
hmm_biofam$observations[[1]], n_states = 3,
hmm_biofam$observations[[1]][1:10,], n_states = 3,
restarts = 2, threads = 1, maxeval = 2
),
NA
Expand Down

0 comments on commit ce09b3d

Please sign in to comment.