Description Usage Arguments Details Value See Also
predict.hmma
is simply a wrapper function for the mhsmm
predict.hmmspec
function. It generates the predicted
state sequence for dat data, given the model.
1 2 |
object |
The HMMA |
data |
The data file |
method |
The prediction method (viterbi or smoothed, see details) |
... |
Futher arguments. |
From the mhsmm documentation: If method="viterbi", this technique applies the Viterbi algorithm for HMMs, producing the most likely sequence of states given the observed data. If method="smoothed", then the individually most likely (or smoothed) state sequence is produced, along with a matrix with the respective probabilities for each state. This function differs from predict.hmm in that it takes the output from hmmspec ie. this is useful when users already know their parameters and wish to make predictions.
The return object contains the data, a vector 's' with the
reconstructed state sequence, the vector N with the lengths of the
sequences, a matrix p with the probabilities of the states (only with
smoothed). For more details see predict.hmmspec
.
The loglikelihood is returned as the $loglik
component.
predict.hmmspec
for more information.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.