emission probability using hmmlearn package in python


I am learning hmm and try to implement it in Python hmmlearn package(http://hmmlearn.github.io/hmmlearn/hmm.html#building-hmm-and-generating-samples).

However I am not quite understand what the documentation says:

Classes in this module include MultinomialHMM, GaussianHMM, and GMMHMM. They implement HMM with emission probabilities determined by multimomial distributions, Gaussian distributions and mixtures of Gaussian distributions.

Does this means when we try to estimate the model given an observation sequence, the emission probability can only be these three kind? what if I want to type in the emission probability by meself?


Posted 2015-08-12T14:16:42.160

Reputation: 131



According to that same documentation you provided, the way to use custom emission probabilities is:

"1.1.3. Implementing HMMs with custom emission probabilities
If you want to implement other emission probability (e.g. Poisson), you have to implement a new HMM class by inheriting the _BaseHMM and overriding the methods init, _compute_log_likelihood, _set and _get for additional parameters, _initialize_sufficient_statistics, _accumulate_sufficient_statistics and _do_mstep."

NOTE: The documentation pages are for hmm.learn version 0.1.* which is no longer the most recent one. That is, it seems that the documentation page available at any given time might not correspond to the most recent version of hmmlearn. For example, sample code for hmm 0.1.* does not run with hmm learn 0.20.


Posted 2015-08-12T14:16:42.160

Reputation: 111