18
$\begingroup$

I'm looking for some python implementation (in pure python or wrapping existing stuffs) of HMM and Baum-Welch.

Some ideas?

I've just searched in google and I've found really poor material with respect to other machine learning techniques. Why?

$\endgroup$

6 Answers 6

16
$\begingroup$

The scikit-learn has an HMM implementation. It was until recently considered as unmaintained and its usage was discouraged. However it has improved in the development version. I cannot vouch for its quality, though, as I know nothing of HMMs.

Disclaimer: I am a scikit-learn developer.

Edit: we have moved the HMMs outside of scikit-learn, to https://github.com/hmmlearn/hmmlearn

$\endgroup$
4
  • $\begingroup$ yeah i decide to don't use it because of unmantainement.. $\endgroup$
    – nkint
    Mar 11, 2012 at 18:29
  • $\begingroup$ I think that it is improving and that we will soon be able to commit to maintaining it. $\endgroup$ Mar 11, 2012 at 19:03
  • $\begingroup$ does the sklearn implementation use Baum-Welch? $\endgroup$
    – Vishal
    Sep 24, 2012 at 13:03
  • $\begingroup$ Yes it does. See _BaseHMM documentation for implementation details. $\endgroup$ Mar 1, 2016 at 11:04
3
$\begingroup$

Have you seen NLTK?

http://www.nltk.org/

It has some classes that are suitable for this sort of thing, but somewhat application dependent.

http://www.nltk.org/api/nltk.tag.html#nltk.tag.hmm.HiddenMarkovModelTrainer

If you are looking for something more 'education oriented', I wrote toy trainer a while ago:

http://pastebin.com/aJG3Ukmn

$\endgroup$
5
  • $\begingroup$ thanks. i need it for gesture recognition. i'm stucked on what could be my alphabet (symbols in nltk) in my application.. $\endgroup$
    – nkint
    Jan 19, 2012 at 11:40
  • $\begingroup$ @nkint Check this out: ri.cmu.edu/pub_files/pub3/yang_jie_1994_1/yang_jie_1994_1.pdf $\endgroup$
    – qi5d02lx
    Jan 19, 2012 at 11:47
  • $\begingroup$ ok the data are the labels so if i use only 8 labels for clusterize the coordinates of a gesture.. alphabet is [1,2,3,4,5,6,7] $\endgroup$
    – nkint
    Jan 19, 2012 at 17:16
  • $\begingroup$ but still don't understand the difference between state and symbol in HiddenMarkovModelTrainer constructor $\endgroup$
    – nkint
    Jan 19, 2012 at 18:15
  • 1
    $\begingroup$ alright, how about this: creativedistraction.com/demos/… it's a step-by-step demo with code of how to build your own gesture recognizer with the kinect. code is for Octave not python, but it seems like you are stuck on the ideas/implementation more than the particulars of the software. of course it requires a kinect... you might also check this out: code.google.com/p/ehci $\endgroup$
    – qi5d02lx
    Jan 19, 2012 at 23:40
1
$\begingroup$

Some implementation of basic algorithms (including Baum-welch in python) are available here: http://ai.cs.umbc.edu/icgi2012/challenge/Pautomac/baseline.php

$\endgroup$
1
$\begingroup$

The General Hidden Markov Model library has python bindings and uses the Baum-Welch algorithm.

$\endgroup$
0
$\begingroup$

Following is a Pyhton implementation of Baum-Welch Algorithm:

https://github.com/hamzarawal/HMM-Baum-Welch-Algorithm

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.