简体   繁体   中英

Viterbi algorithm without fitting a HMM model, python

I have a set of observation and states that I determined. I'm trying to associate the observations to the states but the hmmlearn library will only decode the observation after fitting the HMM to the observation. The fitting changes the states which is unwanted.

Is there a HMM implementation that doesn't fit the model?

If anyone needs to make a similar HMM with known states, the built-in classes have options to declare which parameters to fit. The default for guassian hmm is

params='stmc'

It can be changed to only 's' so only the starting probabilities are fitted or even to an empty string and the fit doesn't change anything. If a custom hmm is needed, the created hmm class can overwrite the decode/predict methods and just not require a fit.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM