I have a GaussianHMM that I have fitted using hmmlearn.fit function. I also have a bunch of sequences of observations and I want to compute the probability of each sequence happening given my fitted model. I looked into hmmlearn's documentation and I couldn't quite find a method that does what I want. In this case, do I just have to code the forward-backward algorithm? In case I code the forward-backward, I would also need the emission matrix, which is not given by hmmlearn.
Anyone has an advice regarding this? thank you!
I also have a bunch of sequences of observations and I want to compute the probability of each sequence happening given my fitted model
score
function, to evaluate the probability of sequence (ie. model.score(X)
). Note that this is the log probability, as hmmlearn
adjusts for underflow error.In case I code the forward-backward, I would also need the emission matrix, which is not given by hmmlearn.
GaussianHMM
does not have an emission matrix, you can choose to discretize your emissions and utilize MultinomialHMM
, which allows you to specify and also later extract the emission matrix model.emissionprob_
.