<p>Hi, </p>
<p>I'm trying to use mlpack to train HMM for word models, but most of my HMMs failed to converge with the given error:</p>
<blockquote>
<p>error: chol(): failed to converge</p>
</blockquote>
<p>Here is the code (unfortunately, not standalone, it's inside another program): </p>
<pre><code> 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);
</code></pre>
<p>I can give you the complete code, but it won't execute on its own. </p>
<p>Looking at the features and labels, it seems OK, but I'm not a specialist in HMM at all. </p>
<p>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 ? </p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/issues/538">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFMyZ6lBrbmyazSOY896X9dQ4f5OBks5ppWLhgaJpZM4HnSvw.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/mlpack/mlpack/issues/538"></link>
<meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>