View source: R/decoding_functions.R
| stateprobs_g | R Documentation |
Computes
\Pr(\text{State}_t = j \mid X_1, ..., X_T)
for inhomogeneous HMMs
stateprobs_g(
delta,
Gamma,
allprobs,
trackID = NULL,
mod = NULL,
forecast = FALSE
)
delta |
initial distribution; either
|
Gamma |
array of transition probability matrices of dimension |
allprobs |
matrix of state-dependent probabilities or density values of dimension |
trackID |
optional vector of length |
mod |
optional model object containing |
forecast |
logical, indicating if forecast probabilities |
matrix of conditional state probabilities of dimension c(nObs, nStates)
Other decoding functions:
stateprobs(),
stateprobs_p(),
viterbi(),
viterbi_g(),
viterbi_p()
Gamma = tpm_g(runif(10), matrix(c(-1,-1,1,-2), nrow = 2, byrow = TRUE))
delta = c(0.5, 0.5)
allprobs = matrix(runif(20), nrow = 10, ncol = 2)
probs = stateprobs_g(delta, Gamma[,,-1], allprobs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.