[mlpack-git] [mlpack] hmm_train failed to converge (#496)

Ryan Curtin notifications at github.com
Mon Jan 25 10:38:06 EST 2016


An update: I was using the debugger wrong, and the results made sense, I was just doing stupid things and reading the results wrong.  I was correct that this is occurring because the covariance matrices for individual Gaussians is very small, and like in each round of debugging this particular problem, the solution will lie in `positive_definite_constraint.hpp`, the bit of code that forces the covariance to be positive definite.

Originally, I added to the diagonal until `det(covariance)` was greater than some small number (I arbitrarily chose 1e-50).  But this didn't always work, so I replaced it with a check that the Cholesky decomposition was successful.  But, it turns out that there are situations where the Cholesky decomposition appears to succeed but gives wildly inaccurate results, due to (I think) machine precision issues.

I think that the solution here is going to be to enforce a check based on the condition number of the matrix and the machine precision, but I need to do some reading to familiarize myself with numerical linear algebra precision issues first.  When I implement a fix, I'll then test with your dataset and different random seeds for a day or two to make sure that the issue doesn't recur.

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


More information about the mlpack-git mailing list