Possible Duplicate:
Python k-means algorithm
I want to cluster 10000 indexed points based on their feature vectors and get their ids after clustering i.e. cluster1:[p1, p3, p100, …], cluster2:[…] …
Is there any way to do this in Python? Thx~
P.s. The indexed points are stored in a 10000*10 matrix, where each row represents a feature vector.
Use some clustering algorithm – I’ve included an implementation of the K-means algorithm that @Cameron linked to in his second comment, but you might want to refer to the link in his first comment. I’m not sure what you mean by get their ID’s, could you elaborate?