[mlpack-git] [mlpack] HMM simple example (#470)

Ryan Curtin notifications at github.com
Mon Nov 16 10:03:42 EST 2015


Hi Davud,

You're right, the labels have to be numbers.  At some time in the future, it may be possible to change this, but for now, all mlpack data has to be numeric.  The labels should be from 0 to (n_classes - 1).

For the GMM HMM, if you're using the `hmm_train` program, you can load the observation sequence with the `-i` option (for the data) and the `-l` option for the labels.  You can specify that GMMs should be used with the options `-t gmm` and `-g $n` where `$n` is the number of Gaussians you want in each mixture.  The number of states in the model can be specified with the `-n` option.  The program will then train a GMM HMM with the given parameters, and you can save the generated HMM to a file with the `-o` option (i.e. `-o the_best_hmm_ever_created.xml`).

Once that's done, you can then use the other programs to perform various functionality with the trained HMM:

 - `hmm_generate` can generate sequences of emissions (and hidden states) randomly from a given HMM.
 - `hmm_viterbi` can evaluate the most likely sequence of hidden states given some observations and an HMM.
 - `hmm_loglik` can evaluate the log-likelihood of a sequence having a given set of hidden states for a given HMM.

You could also use `hmm_train` again to train with additional observations (use the `-m` option).

I hope this is helpful; let me know if I can clarify anything.

Can you tell me more about the dimension limit you experienced with the discrete HMM?  There should be no dimension limit (well, technically the dimension limit will be something like 18 quintillion, but I doubt that your data is that large...).  27-dimensional observations should not be an issue at all.

---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/470#issuecomment-157060403
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20151116/62c0f6df/attachment.html>


More information about the mlpack-git mailing list