<p>These series of commits adds caching of various factorizations and inverses of the covariance matrix for the gaussian distribution. Note that the previous version did not do error checking for positive definite (or even symmetric matrices) on construction-- this is no longer the case (via a cholesky decomposition attempt which fails if the assumption is violated).</p>

<p>In addition, various test cases had to be fixed to make this work. Previous test cases did not even use symmetric covariance matrices in some cases (who knows what the results were actually computing)!</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>&nbsp;&nbsp;<a href='https://github.com/mlpack/mlpack/pull/390'>https://github.com/mlpack/mlpack/pull/390</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>WIP: gaussian distribution caches covariance factorizations</li>
  <li>WIP: fix one test case</li>
  <li>fix some distribution test cases</li>
  <li>some more distribution test fixes</li>
  <li>ensure random covariance is positive definite</li>
  <li>fix HMM load/save tests by ensuring covariance is positive definite</li>
  <li>remove stray commit</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/390/files#diff-0">src/mlpack/core/dists/gaussian_distribution.cpp</a>
    (50)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/390/files#diff-1">src/mlpack/core/dists/gaussian_distribution.hpp</a>
    (36)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/390/files#diff-2">src/mlpack/core/dists/regression_distribution.hpp</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/390/files#diff-3">src/mlpack/methods/gmm/em_fit_impl.hpp</a>
    (47)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/390/files#diff-4">src/mlpack/methods/gmm/gmm_convert_main.cpp</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/390/files#diff-5">src/mlpack/methods/hmm/hmm_util_impl.hpp</a>
    (8)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/390/files#diff-6">src/mlpack/tests/distribution_test.cpp</a>
    (87)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/390/files#diff-7">src/mlpack/tests/gmm_test.cpp</a>
    (7)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/390/files#diff-8">src/mlpack/tests/hmm_test.cpp</a>
    (14)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/mlpack/mlpack/pull/390.patch'>https://github.com/mlpack/mlpack/pull/390.patch</a></li>
  <li><a href='https://github.com/mlpack/mlpack/pull/390.diff'>https://github.com/mlpack/mlpack/pull/390.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/pull/390">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFDSkT2vFZiNTC7WgL_TxWEw8aqDCks5njvhYgaJpZM4DU_qd.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/pull/390"></link>
    <meta itemprop="name" content="View Pull Request"></meta>
  </div>
  <meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>