Solved – Question about classification with hidden Markov models using depmixS4

I am using the depmixS4 package to fit HMMs.

I have three different classes of data and I have fitted 3 separate HMMs using the depmixS4 depmix and fit functions and given a new sequence of observations, I would like to be able to compute the probability (or log odds) of that new observation sequence given each of the three models that have already been trained.

I understand this would normally be done using the Viterbi algorithm, but I have no idea how this can be implemented in depmixS4.

Due to the functionality of depmixS4 I cannot use the HMM or HiddenMarkov packages

Your help is greatly appreciated!

Thank you in advance

You must use forward function to calculate the likelihood by sum forward's probability from first step until last one.

sum(forward_prob(t)) 

Similar Posts:

Rate this post

Leave a Comment