View Single Post
Old 09-10-2012, 02:36 PM
TonySuarez TonySuarez is offline
Join Date: Jul 2012
Location: Lisboa, Portugal
Posts: 35
Default Re: Question 14 LLoyd's algorithm - empty clusters

Originally Posted by dudefromdayton View Post
It's fuzzy to me right now, but it looks like when I had no points in a cluster, its center snapped to the origin! Oops. I'm not sure this happened enough to harm my score, though.
I implemented an "abort" counter for these cases, and subtracted its final value from the number of runs in the batch to calculate the statistics.

I already ran 20 or more times the simulation, where each one has 1000 runs, for K=9, K=12, various gamma, etc. I only saw 1 abort due to an "isolated" center. So, I think that this is not an issue in statistical terms. Hope I don't have bugs in the implementation...

Regarding your observation dudefromdayton, perhaps you reset your cluster centers to zero before Lloyd's algorithm, and somehow it (or they) stays zero if no X points are near it.
Reply With Quote