Group points in space. Similar to KMeans quark by Dan Stowell but this one is implemented slightly differently and also uses RedVector.
k |
The number of centroids. |
max |
The maximum number of tries in undecided/borderline situations. |
This will reset any previously calculated centroids on next update.
Test only one vector on the current centroids. Rarely needed.
Vectors should be an array of RedVector objects. The vectors can be of any dimension.
An array containing the result after the update method is called. It holds -k number of RedVector objects representing the found centroids.
An array containing the result after the update method is called. It holds indices and have the same size as the number of items in the vectors array. Each index represents which centroid each vector belongs to. So to look up the closest centroid for vector i, do centroids[classifications[i]].