[mlpack-git] [mlpack] HMM Training fails to converge (#538)

Baptiste Wicht notifications at github.com
Wed Mar 2 05:13:53 EST 2016


Hi, 

I'm trying to use mlpack to train HMM for word models, but most of my HMMs failed to converge with the given error:

> error: chol(): failed to converge

Here is the code (unfortunately, not standalone, it's inside another program): 
```
    using GMM = mlpack::gmm::GMM;

    template<typename Distribution>
    using HMM = mlpack::hmm::HMM<Distribution>;

    using hmm_p = std::unique_ptr<HMM<GMM>>;

    constexpr const std::size_t n_gaussians = 1;

    const auto n_states_per_char = 1;
    const auto n_states = characters * n_states_per_char;
    const auto n_features = 9;

    auto hmm = std::make_unique<HMM<GMM>>(n_states, GMM(n_gaussians, n_features));

    std::vector<arma::mat> images(ref_a.size());
    std::vector<arma::Row<size_t>> labels(ref_a.size());

    //Fill images and labels...

     //Each image is initialized like this: 
     images[image] = arma::mat(n_features, width);
     labels[image] = arma::Row<size_t>(width);

    hmm->Train(images, labels);
```

I can give you the complete code, but it won't execute on its own. 

Looking at the features and labels, it seems OK, but I'm not a specialist in HMM at all. 

Is there some parameters I can play with to avoid this ? Is there anyway I can have some more verbose output that could help me investigate the issue ? 

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


More information about the mlpack-git mailing list