[SciPy-User] kmeans2 question/issue

Gael Varoquaux gael.varoquaux@normalesup....
Mon Aug 6 00:30:48 CDT 2012

On Sun, Aug 05, 2012 at 04:09:06PM -0700, James Abel wrote:
> I'm trying to use scipy.cluster.vq.kmeans2() but I'm getting inconsistent
> output.  With a simple test input that should have 3 clusters, I'm getting
> good results most of the time but every so often the output creates the
> wrong clustering.

K Means is a non-convex problem: it is dependent on the (random)
initialization. In addition, it is not garantied to find the 'true'
clusters, because quite often it is not possible from the data.

You are not doing anything wrong, you are just asking for something that
is not possible.



More information about the SciPy-User mailing list