Skip to content

Commit

Permalink
return id-constant probs only once
Browse files Browse the repository at this point in the history
  • Loading branch information
helske committed Dec 5, 2024
1 parent 2240195 commit d0493a6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/get_probs.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ get_initial_probs.nhmm <- function(model, probs, ...) {
}
if (attr(model$X_pi, "icpt_only")) {
X <- model$X_pi[, 1L, drop = FALSE]
ids <- "all"
} else {
X <- model$X_pi
}
Expand Down Expand Up @@ -104,6 +105,7 @@ get_transition_probs.nhmm <- function(model, probs, remove_voids = TRUE, ...) {
}
if (!attr(model$X_A, "iv")) {
X <- model$X_A[, , 1L, drop = FALSE]
ids <- "all"
} else {
X <- model$X_A
}
Expand Down Expand Up @@ -192,6 +194,7 @@ get_emission_probs.nhmm <- function(model, probs, remove_voids = TRUE, ...) {
}
if (!attr(model$X_B, "iv")) {
X <- model$X_B[, , 1L, drop = FALSE]
ids <- "all"
} else {
X <- model$X_B
}
Expand Down Expand Up @@ -286,6 +289,7 @@ get_cluster_probs.mnhmm <- function(model, probs, ...) {
}
if (attr(model$X_omega, "icpt_only")) {
X <- model$X_omega[, 1L, drop = FALSE]
ids <- "all"
} else {
X <- model$X_omega
}
Expand Down

0 comments on commit d0493a6

Please sign in to comment.