[mlpack-git] [mlpack] How to speed up HMM training ? (#550)

Ryan Curtin notifications at github.com
Thu Mar 10 10:29:19 EST 2016


Hey there,

Sorry for the slow response---I have been busy with some other things this week.  It's worth noting that the GMM code you pasted where you iterate over each image and call `gmm->Train(images[i], 1, true)` is actually quite different than what `hmm->Train(images)` will do.  The HMM training process will associate each observation with a probability of coming from each state (in your case, all of these probabilities will be 1), and then flatten all the observations into a single matrix and call `GMM::Train(const arma::mat& dataset, const arma::vec& probabilities)`.  So this *should* be the exact same thing as flattening the data and calling `GMM::Train(const arma::mat& flattenedData)`, but according to what you are saying, the HMM version takes way longer than the flattened GMM version.

When I have some time, I am going to try to reproduce this by taking a flattened dataset, training an HMM with one state, and training a GMM, in the same way you've suggested, and see if the runtimes differ (also important will be setting the random seed to the same thing so that the starting point for each GMM optimization should be the same).

Another thing worth noting is that, in general, training a GMM-HMM without labeled data is a long process that may not give very good results.  It's much better to do labeled training if possible.

---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/550#issuecomment-194905269
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160310/4d2ab703/attachment.html>


More information about the mlpack-git mailing list