[SciPy-user] Mysterious kmeans() error

Roy H. Han starsareblueandfaraway@gmail....
Wed Feb 4 10:31:27 CST 2009


Has anyone seen this error before?  I have no idea what it means.  I'm
using version 0.6.0 packaged for Fedora.
I'm getting this error using the kmeans2() implementation in scipy.cluster.vq


  File "/mnt/windows/svn/networkPlanner/acquisition/libraries/probability_process.py",
line 55, in grapeCluster
    assignments = scipy.cluster.vq.kmeans2(globalCluster, k=2,
iter=iterationCountPerBurst)[1]
  File "/usr/lib64/python2.5/site-packages/scipy/cluster/vq.py", line
563, in kmeans2
    clusters = init(data, k)
  File "/usr/lib64/python2.5/site-packages/scipy/cluster/vq.py", line
469, in _krandinit
    x = N.dot(x, N.linalg.cholesky(cov).T) + mu
  File "/usr/lib64/python2.5/site-packages/numpy/linalg/linalg.py",
line 418, in cholesky
    Cholesky decomposition cannot be computed'
numpy.linalg.linalg.LinAlgError: Matrix is not positive definite -
    Cholesky decomposition cannot be computed


Thanks,
RHH


More information about the SciPy-user mailing list