This function is a wrapper around the function predict_states_hsmm(). It predicts the most likely hidden states from observations. Two methods are implemented: "Viterbi" applies the Viterbi algorithm and predicts the most likely sequence of hidden states, and "FwBw" applies the Forward-Backward algorithm and returns the probability of each state at each time-point.

# S3 method for hsmm
predict(object, newdata, method = "Viterbi", verbose = FALSE, ...)

Arguments

object

an hsmm model specified via the specify_hsmm() function.

newdata

a data.frame with the observation sequences.

method

a character specifying the method to be used, i.e. either "Viterbi" or "Fwbw".

verbose

a logical (default = FALSE). Should the function print additional information?

...

additional arguments.

See also

see predict_states_hsmm() for the full description, options and examples.