Infinite loop in KMeans
Status: Beta
Brought to you by:
thomasabeel
I used JavaML 0.1.7
Some datas cause infinite loop during a clusterization with KMeans. I cannot provide data to test the issue but I debugged and found what problem is.
There is a loop: while ((randomCentroids) || ((iterationCount < this.numberOfIterations) && (centroidsChanged)))
When iterationCount exeded this.numberOfIterations, the randomCentroids variable still can be true. This cause infine loop when countPosition array contains a zero (0) values, e.g. [0, 400, 0, 0].