From d0493a6b42eacc47446333509ed8cc9578caa660 Mon Sep 17 00:00:00 2001 From: Jouni Helske Date: Thu, 5 Dec 2024 10:08:32 +0200 Subject: [PATCH] return id-constant probs only once --- R/get_probs.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/R/get_probs.R b/R/get_probs.R index ac04fed..4086426 100644 --- a/R/get_probs.R +++ b/R/get_probs.R @@ -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 } @@ -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 } @@ -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 } @@ -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 }