SyfSchydea / New-Horizons-Pattern-Generator

Takes an image and outputs a New Horizons pattern
3 stars 0 forks source link

K-means empty cluster policy #2

Closed SyfSchydea closed 4 years ago

SyfSchydea commented 4 years ago

When a cluster is empty, it should keep the same position as its previous iteration.

Currently the cluster is re-assigned to a random point, but this seems to result in infinite loops on some data-sets.

This method would keep k-means in-line with scipy's k-means implementation (when it doesn't simply raise an error for it)

SyfSchydea commented 4 years ago

Done