View source: R/decode_states.R
| decode_states | R Documentation |
This function decodes the (most likely) underlying hidden state sequence by applying the Viterbi algorithm for global decoding.
decode_states(x, verbose = TRUE)
viterbi(observations, nstates, sdd, Gamma, mu, sigma = NULL, df = NULL)
x |
[ |
verbose |
[ |
observations |
[ |
nstates |
[ |
sdd |
[
|
Gamma |
[ |
mu |
[ For the gamma- or Poisson-distribution, |
sigma |
[ Not relevant in case of a state-dependent Poisson distribution. |
df |
[ Only relevant in case of a state-dependent t-distribution. |
An object of class fHMM_model with decoded state sequence
included.
https://en.wikipedia.org/wiki/Viterbi_algorithm
decode_states(dax_model_3t)
plot(dax_model_3t, type = "ts")
viterbi(
observations = c(1, 1, 1, 10, 10, 10),
nstates = 2,
sdd = "poisson",
Gamma = matrix(0.5, 2, 2),
mu = c(1, 10)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.