Your low-level Linear Algebra Package (LAPACK) is returning an error code
for the Cholesky decomposition calculation.

Can you reproduce the error by running the test code stand-alone?
I mean, running the followin lines:


====

from sklearn.externals.six.moves import cPickle
from sklearn.metrics.pairwise import kernel_metrics

dumps, loads = cPickle.dumps, cPickle.loads

import numpy as np
from scipy import sparse

from sklearn.utils import check_random_state
from sklearn.utils.testing import assert_equal
from sklearn.utils.testing import assert_array_equal
from sklearn.utils.testing import assert_raises
from sklearn.utils.testing import assert_greater

from sklearn.cluster import SpectralClustering, spectral_clustering
from sklearn.cluster.spectral import spectral_embedding
from sklearn.cluster.spectral import discretize
from sklearn.metrics import pairwise_distances, adjusted_rand_score
from sklearn.metrics import adjusted_rand_score
from sklearn.metrics.pairwise import rbf_kernel
from sklearn.datasets.samples_generator import make_blobs

# Test the lobpcg mode of SpectralClustering
# We need a fairly big data matrix, as lobpcg does not work with
# small data matrices
centers = np.array([
    [0., 0.],
    [10., 10.],
])
X, true_labels = make_blobs(n_samples=100, centers=centers,
                            cluster_std=.1, random_state=42)
D = pairwise_distances(X)  # Distance matrix
S = np.max(D) - D  # Similarity matrix
labels = spectral_clustering(S, n_clusters=len(centers),
                             random_state=0, eigen_solver="lobpcg")
# We don't care too much that it's good, just that it *worked*.
# There does have to be some lower limit on the performance though.
assert_greater(np.mean(labels == true_labels), .3)



On Tue, Jan 14, 2014 at 5:35 PM, John Ladasky <john_lada...@sbcglobal.net>wrote:

>  Hi folks,
>
> This is my first post to scikit-learn-general.  I am trying to install the
> package on my system.  I got pretty far, but not all the way.
>
> My system has an AMD 6-core CPU.  I'm running Ubuntu 13.10 64-bit, and
> Python 3.3.  I downloaded the source files for scikit-learn 0.14.  The
> Ubuntu repository only has scikit-learn 0.13, and I also suspect that that
> package is probably expecting to install on Python 2.
>
> I read the build instructions at
> http://scikit-learn.org/stable/install.html.  I did a manual setup.py
> build and installation with Python3.  I saw many warnings, but no errors.
> I can import sklearn from the Python 3.3 interpreter.  I CANNOT import
> sklearn in Python 2.7.  That's what I want.  So far, so good.
>
> Back out at the shell, unfortunately, the nosetest fails.  Here is the
> tail of the output from "nosetests --exe sklearn":
>
>
>
> ======================================================================
> ERROR: sklearn.cluster.tests.test_spectral.test_spectral_lobpcg_mode
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/local/lib/python3.3/dist-packages/nose/case.py", line 198, in
> runTest
>     self.test(*self.arg)
>   File
> "/usr/local/lib/python3.3/dist-packages/sklearn/cluster/tests/test_spectral.py",
> line 66, in test_spectral_lobpcg_mode
>     random_state=0, eigen_solver="lobpcg")
>   File
> "/usr/local/lib/python3.3/dist-packages/sklearn/cluster/spectral.py", line
> 268, in spectral_clustering
>     eigen_tol=eigen_tol, drop_first=False)
>   File
> "/usr/local/lib/python3.3/dist-packages/sklearn/manifold/spectral_embedding_.py",
> line 303, in spectral_embedding
>     largest=False, maxiter=2000)
>   File
> "/usr/lib/python3/dist-packages/scipy/sparse/linalg/eigen/lobpcg/lobpcg.py",
> line 405, in lobpcg
>     activeBlockVectorBP, retInvR = True )
>   File
> "/usr/lib/python3/dist-packages/scipy/sparse/linalg/eigen/lobpcg/lobpcg.py",
> line 142, in b_orthonormalize
>     gramVBV = sla.cholesky( gramVBV )
>   File "/usr/lib/python3/dist-packages/scipy/linalg/decomp_cholesky.py",
> line 80, in cholesky
>     check_finite=check_finite)
>   File "/usr/lib/python3/dist-packages/scipy/linalg/decomp_cholesky.py",
> line 30, in _cholesky
>     raise LinAlgError("%d-th leading minor not positive definite" % info)
> numpy.linalg.linalg.LinAlgError: 2-th leading minor not positive definite
>
> ----------------------------------------------------------------------
> Ran 1712 tests in 79.958s
>
> FAILED (SKIP=14, errors=1)
>
>
>
> I tried the alternative testing method suggested at
> http://scikit-learn.org/stable/install.html#testing, however that
> approach is now deprecated.
>
> I would appreciate any advice you may have on correcting this error.  Many
> thanks.
>
>
>
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
>
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to