viterbi                 package:RHmm                 R Documentation

_V_i_t_e_r_b_i _a_l_g_o_r_i_t_h_m

_D_e_s_c_r_i_p_t_i_o_n:

     This function calculates the optimal hidden states sequence using
     Viterbi's algorithm

_U_s_a_g_e:

     viterbi(HMM, obs)

_A_r_g_u_m_e_n_t_s:

     HMM: a HMMClass or a HMMFitClass object

     obs: The vector, matrix, data frame, list of vectors or list of
          matrices of observations

_V_a_l_u_e:

     a viterbiClass object which is a list with: 

  States: Sequence of hidden states in 1...nStates

logViterbiScore: logarithm of the Viterbi's Score

logProbSeq: logarithm of probability of having the sequence of states
          conditionally to having the observations

_R_e_f_e_r_e_n_c_e_s:

     Among hundreds of tutorials, you can have a look to use 
      Phil Blunsom (2004) _ Hidden Markov Models_ <URL:
     http://www.cs.mu.oz.au/460/2004/materials/hmm-tutorial.pdf>

_S_e_e _A_l_s_o:

     HMMSet, HMMFit

_E_x_a_m_p_l_e_s:

     data(geyser)
     obs <- geyser$duration
     #Fits an 2 states gaussian model for geyser duration
     ResFitGeyser <- HMMFit(obs)
     VitGeyser <- viterbi(ResFitGeyser, obs)

