Hello,
I'm trying to write an algorithm to calculate centroids of 3 clusters obtained from a data set using the k-means method.
Attached is the MC12 worksheet with the algorithm. For some reason, I only get the correct centroid for the first cluster and when using the same function to calculate the centroids for second and third cluster I get the same wrong answer.
I found that somebody had posted a worksheet with k-means algorithm a long time ago at this thread:
http://communities.ptc.com/thread/17242
but the worksheet has been removed from the thread.
Thank you,
Gigi