Extract Most Probable Cluster for Each Sequence
most_probable_cluster(x, type = "viterbi", hp = NULL)
A vector containing the most probable cluster for each sequence.
An object of class mhmm
or mnhmm
.
A character string specifying the method to use. Either
"viterbi"
(default) or "posterior"
. Former uses the most probable hidden
path to determine the cluster membership for each sequence, while the latter
finds the cluster which has the largest sum of posterior probabilities of
states of that cluster.
An output from hidden_paths()
function. Only used in case of
type = "viterbi"
. If missing, hidden paths will be computed using x
.