<p>Hi Jinqiang,</p>

<p>I took a look, and the HMM code initializes the transition matrix uniformly.  But I think this is a saddle point for the EM optimization, so the optimization gets stuck.  In <a href="https://github.com/mlpack/mlpack/commit/3e4f3cade8a59f1a49c07e08c39fe6af33e2da06" class="commit-link"><tt>3e4f3ca</tt></a> I added an option to <code>mlpack_hmm_train</code> called <code>--random_initialization</code>, which will start the optimization with uniformly randomly distributed emission and transition matrices.  I think this will fix your issue.  So if you update to the latest git master branch and rebuild, I think this will solve your problem.  Let me know if it doesn't, and we can reopen the issue and I can try again... :)</p>

<p>Thanks,</p>

<p>Ryan</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly or <a href="https://github.com/mlpack/mlpack/issues/638#issuecomment-219520481">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFMbw3xhC6gHqeJxXjTXae-5WYEpEks5qCMQGgaJpZM4IdqK0.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/638#issuecomment-219520481"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>