PyMC: Hidden Markov Models

How suitable is PyMC in its currently available versions for continuous emission HMM modeling?

I am interested in having a structure in which I can easily explore variations of the model without updating the E- and M-step relays and dynamic programming for every change I make to the model.

More specific questions:

  • When modeling an HMM in PyMC, I can answer "typical" problems that need to be solved, ie. in addition to estimating the parameters, also output the most probable sequence (as is usually done with the Viterbi algorithm) or solve the smoothing problem?
  • Compared to the expectation-maximizing implementation, I expect the sample-based approach to be slower. If it gives me a lot of flexibility on the model-building side, that's fine. I would suggest using PyMC for prototyping models. However, I'm wondering if I can expect PyMC to process the output for models with observations> 10k to finish at any reasonable time.
  • You would suggest starting with PyMC2 or PyMC3 to build your model. I know the inference engine has changed between the version, so I would like to ask specifically which type of sampler might be more appropriate.

If you think PyMC is not a good choice for my use case, it definitely helps as an answer.

+3


source to share





All Articles