Reputation: 960
Im using kmeans function in matlab for clustering of my dataset. Im interested in the centroid generated from the function.
During the 1st run, the centroid produced are c1,c2,c3. During the 2nd run, the centroid produced are c2,c1,c3
For the next run, it produces the permutation of the centroid.
is there any way to produce the same permutation for every run i.e c1,c2,c3 ?
Upvotes: 0
Views: 2084
Reputation: 767
You have to change the method used to choose the initial cluster centroid positions, sometimes known as seeds. The default option selects k observations from X at random. Read http://www.mathworks.com/help/toolbox/stats/kmeans.html
Upvotes: 2