This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Description
Near the end of the Learn(...) method (line 230, for statement) you calculate the proportions of each cluster, suposing that shouldStop = converged(centroids, newCentroids); returned true because of an actual convergence. This is not always the case when you had set up MaxIterations beforehand.
converged(...) can return true when the limit has been reached but no valid solution has yet been found. In that case Cluster.Proportions values are wrong because they are not really calculated with the actual proportions of the current iteration, but rather with the assumption that everything ended successfully and they have all the same ratio.