predict.hsmm {mhsmm} | R Documentation |
Predicts the underlying state sequence for an observed sequence x
given a hsmm
model
## S3 method for class 'hsmm': predict(object, x, method = "viterbi", ...)
object |
An object of type hsmm |
x |
A vector or dataframe of observations |
method |
Only "viterbi" is available at the moment |
... |
further arguments passed to or from other methods. |
This technique applies the Viterbi algorithm for HSMMs, producing the most likely sequence of states given the observed data.
Returns a hsmm.data
object, suitable for plotting.
x |
A vector or data.frame of observations |
s |
A vector containing the reconstructed state sequence |
N |
The lengths of each sequence |
Jared O'Connell
Guedon, Y. (2003), Estimating hidden semi-Markov chains from discrete sequences, Journal of Computational and Graphical Statistics, Volume 12, Number 3, page 604-639 - 2003
hsmm
##See 'hsmm' for examples