[PD] Hidden Markov Models

Bryan Jurish jurish at ling.uni-potsdam.de
Fri Feb 10 11:38:30 CET 2006


moin David,

On 02/09/2006 10:07:54 PM, David Plans Casal <main at davidcasal.com>
appears to have written:
> On 9 Feb 2006, at 09:13, Bryan Jurish wrote:
> 
>> I haven't implemented Baum-Welch, but there is a Viterbi  implementation
>> in the [gfsm] library (which has Pd wrappers), although I haven't  ported
>> the Viterbi stuff to Pd yet, since it's still pretty new.
> 
> 
> Do you mean the Viterbi stuff is not in moocow/gfsm?

right, it's only been added to libgfsm recently, and I'm still not too
sure about the API.  Right now, you need to explicitly build the Viterbi
trellis as an FSM [using gfsm_automaton_lookup_viterbi_full()],  Then
you need to call either gfsm_viterbi_trellis_paths_full() or
gfsm_viterbi_trellis_bestpath_full() to get the path(s) out of the trellis.

> Could I use the gfsm perl bindings you made?

Sure - it looks like (most of) the relevant XS routines are defined.  If
you're into using Perl though, can I reccommend PDL::HMM ?

http://www.ling.uni-potsdam.de/~moocow/projects/perl/PDL-HMM-0.04.tar.gz

... that's tailored for "pure" 1st-order HMMs (class bigram models), and
it has the forward-, backward-, viterbi-, and Baum-Welch algorithms all
implemented.

> I need to use an HMM-like algorithm to train audio classifiers. 
> Essentially, I need to spot things like presence or absence of human 
> voice, 'genre' (production specific), etc. I'll be using MPEG7 
> descriptions (features extracted using an mpeg7 encoder) in XML.

I'm not entirely clear on what you're after -- I'm a symbolic kind of
guy; all my HMM and FSM stuff is geared pretty heavily towards modelling
discrete domains.  I know that "continuous" HMMs exist and that they can
be used to get discrete representations for continuous domains, but
that's about where my knowledge of them ends.  afaik, they're pretty
much the same beasts as their discrete cousins, but the observation
probabilities get a bit hairier to work with: can anyone on the list
clear me up on this?

> Do you think Viterbi could work for this case?

If you're talking about continuous (signal) input, my stuff probably
won't work "out of the box", although feel free to adapt and extend and
send me patches [or just get me to put libgfsm on sourceforge] ;-)  In
that case, though, you're honestly probably better off starting with a
different toolkit (I think torch and GHMM both have support for
continuous models).

That said, if your're looking to do Viterbi decoding with GFSM at
runtime in Pd, I'm certainly interested in adding the support to the
pd-gfsm wrappers: maybe I'll get around to that this weekend, as yet
another excuse not to work on my dissertation ;-)

>> marmosets,
>
> hey you're the original marmosets signature guy, ain't ya?

guilty as charged.

peace, love, and small monkeys with big hair,
	Bryan

-- 
Bryan Jurish                           "There is *always* one more bug."
jurish at ling.uni-potsdam.de      -Lubarsky's Law of Cybernetic Entomology




More information about the Pd-list mailing list