View source: R/decoding_functions.R
| stateprobs | R Documentation |
Computes
\Pr(\text{State}_t = j \mid X_1, ..., X_T)
for a given HMM.
stateprobs(
delta,
Gamma,
allprobs,
trackID = NULL,
mod = NULL,
forecast = FALSE
)
delta |
initial distribution; either
|
Gamma |
transition probability matrix; either
|
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_g(),
stateprobs_p(),
viterbi(),
viterbi_g(),
viterbi_p()
Gamma = tpm(c(-1,-2))
delta = stationary(Gamma)
allprobs = matrix(runif(10), nrow = 10, ncol = 2)
probs = stateprobs(delta, Gamma, allprobs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.