[SciPy-user] Mysterious kmeans() error

Roy H. Han starsareblueandfaraway at gmail.com
Wed Feb 4 12:28:35 EST 2009


As a side comment, if I use Pycluster, then the clustering proceeds
without error.

On Wed, Feb 4, 2009 at 11:31 AM, Roy H. Han
<starsareblueandfaraway at gmail.com> wrote:
> 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