<p dir="auto">I seem to get this error at random times while training a GaussianHMM.</p>
<p dir="auto">Is this because of underflow?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  File &quot;train_states.py&quot;, line 156, in &lt;module&gt;
    best_seq = model.decode(t)
  File &quot;/Library/Python/2.7/site-packages/scikit_learn-0.13.1-py2.7-macosx-10.7-intel.egg/sklearn/hmm.py&quot;, line 304, in decode
    logprob, state_sequence = decoder[algorithm](obs)
  File &quot;/Library/Python/2.7/site-packages/scikit_learn-0.13.1-py2.7-macosx-10.7-intel.egg/sklearn/hmm.py&quot;, line 241, in _decode_viterbi
    framelogprob = self._compute_log_likelihood(obs)
  File &quot;/Library/Python/2.7/site-packages/scikit_learn-0.13.1-py2.7-macosx-10.7-intel.egg/sklearn/hmm.py&quot;, line 743, in _compute_log_likelihood
    obs, self._means_, self._covars_, self._covariance_type)
  File &quot;/Library/Python/2.7/site-packages/scikit_learn-0.13.1-py2.7-macosx-10.7-intel.egg/sklearn/mixture/gmm.py&quot;, line 56, in log_multivariate_normal_density
    X, means, covars)
  File &quot;/Library/Python/2.7/site-packages/scikit_learn-0.13.1-py2.7-macosx-10.7-intel.egg/sklearn/mixture/gmm.py&quot;, line 603, in _log_multivariate_normal_density_full
    lower=True)
  File &quot;/src/scipy/scipy/linalg/decomp_cholesky.py&quot;, line 66, in cholesky
    c, lower = _cholesky(a, lower=lower, overwrite_a=overwrite_a, clean=True)
  File &quot;/src/scipy/scipy/linalg/decomp_cholesky.py&quot;, line 24, in _cholesky
    raise LinAlgError(&quot;%d-th leading minor not positive definite&quot; % info)
numpy.linalg.linalg.LinAlgError: 2-th leading minor not positive definite"><pre class="notranslate"><code class="notranslate">  File "train_states.py", line 156, in &lt;module&gt;
    best_seq = model.decode(t)
  File "/Library/Python/2.7/site-packages/scikit_learn-0.13.1-py2.7-macosx-10.7-intel.egg/sklearn/hmm.py", line 304, in decode
    logprob, state_sequence = decoder[algorithm](obs)
  File "/Library/Python/2.7/site-packages/scikit_learn-0.13.1-py2.7-macosx-10.7-intel.egg/sklearn/hmm.py", line 241, in _decode_viterbi
    framelogprob = self._compute_log_likelihood(obs)
  File "/Library/Python/2.7/site-packages/scikit_learn-0.13.1-py2.7-macosx-10.7-intel.egg/sklearn/hmm.py", line 743, in _compute_log_likelihood
    obs, self._means_, self._covars_, self._covariance_type)
  File "/Library/Python/2.7/site-packages/scikit_learn-0.13.1-py2.7-macosx-10.7-intel.egg/sklearn/mixture/gmm.py", line 56, in log_multivariate_normal_density
    X, means, covars)
  File "/Library/Python/2.7/site-packages/scikit_learn-0.13.1-py2.7-macosx-10.7-intel.egg/sklearn/mixture/gmm.py", line 603, in _log_multivariate_normal_density_full
    lower=True)
  File "/src/scipy/scipy/linalg/decomp_cholesky.py", line 66, in cholesky
    c, lower = _cholesky(a, lower=lower, overwrite_a=overwrite_a, clean=True)
  File "/src/scipy/scipy/linalg/decomp_cholesky.py", line 24, in _cholesky
    raise LinAlgError("%d-th leading minor not positive definite" % info)
numpy.linalg.linalg.LinAlgError: 2-th leading minor not positive definite
</code></pre></div>
<p dir="auto">On Ubuntu 13.10 (Saucy), with numpy 1.8.0 and scipy 0.13.3, I get the following failure:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="======================================================================
ERROR: sklearn.cluster.tests.test_spectral.test_spectral_lobpcg_mode
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;/home/vagrant/venvs/2.7/local/lib/python2.7/site-packages/nose/case.py&quot;, line 197, in runTest
    self.test(*self.arg)
  File &quot;/home/vagrant/code/scikit-learn/sklearn/cluster/tests/test_spectral.py&quot;, line 68, in test_spectral_lobpcg_mode
    random_state=0, eigen_solver=&quot;lobpcg&quot;)
  File &quot;/home/vagrant/code/scikit-learn/sklearn/cluster/spectral.py&quot;, line 255, in spectral_clustering
    eigen_tol=eigen_tol, drop_first=False)
  File &quot;/home/vagrant/code/scikit-learn/sklearn/manifold/spectral_embedding_.py&quot;, line 303, in spectral_embedding
    largest=False, maxiter=2000)
  File &quot;/home/vagrant/venvs/2.7/local/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/lobpcg/lobpcg.py&quot;, line 411, in lobpcg
    activeBlockVectorBP, retInvR=True)
  File &quot;/home/vagrant/venvs/2.7/local/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/lobpcg/lobpcg.py&quot;, line 148, in b_orthonormalize
    gramVBV = sla.cholesky(gramVBV)
  File &quot;/home/vagrant/venvs/2.7/local/lib/python2.7/site-packages/scipy/linalg/decomp_cholesky.py&quot;, line 81, in cholesky
    check_finite=check_finite)
  File &quot;/home/vagrant/venvs/2.7/local/lib/python2.7/site-packages/scipy/linalg/decomp_cholesky.py&quot;, line 30, in _cholesky
    raise LinAlgError(&quot;%d-th leading minor not positive definite&quot; % info)
LinAlgError: 2-th leading minor not positive definite

----------------------------------------------------------------------
"><pre class="notranslate"><code class="notranslate">======================================================================
ERROR: sklearn.cluster.tests.test_spectral.test_spectral_lobpcg_mode
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vagrant/venvs/2.7/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/vagrant/code/scikit-learn/sklearn/cluster/tests/test_spectral.py", line 68, in test_spectral_lobpcg_mode
    random_state=0, eigen_solver="lobpcg")
  File "/home/vagrant/code/scikit-learn/sklearn/cluster/spectral.py", line 255, in spectral_clustering
    eigen_tol=eigen_tol, drop_first=False)
  File "/home/vagrant/code/scikit-learn/sklearn/manifold/spectral_embedding_.py", line 303, in spectral_embedding
    largest=False, maxiter=2000)
  File "/home/vagrant/venvs/2.7/local/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/lobpcg/lobpcg.py", line 411, in lobpcg
    activeBlockVectorBP, retInvR=True)
  File "/home/vagrant/venvs/2.7/local/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/lobpcg/lobpcg.py", line 148, in b_orthonormalize
    gramVBV = sla.cholesky(gramVBV)
  File "/home/vagrant/venvs/2.7/local/lib/python2.7/site-packages/scipy/linalg/decomp_cholesky.py", line 81, in cholesky
    check_finite=check_finite)
  File "/home/vagrant/venvs/2.7/local/lib/python2.7/site-packages/scipy/linalg/decomp_cholesky.py", line 30, in _cholesky
    raise LinAlgError("%d-th leading minor not positive definite" % info)
LinAlgError: 2-th leading minor not positive definite

----------------------------------------------------------------------

</code></pre></div>
<p dir="auto">The <code class="notranslate">libatlas3-base</code> and <code class="notranslate">libatlas-dev</code> packages are installed.</p>