find_state_seq: Viterbi algorithm for HMM
Description
Find the most likely hidden state sequence of an observed sequence under HMM
Usage
find_state_seq(seq, P1, P, Q)
Value
a hidden state sequence coded in integers
Arguments
- seq
An action sequence coded in integers
- P1
initial state probability vector of length K
- P
K
by K
state transition probability matrix
- Q
K
by N
state-action (emission) probability matrix