Splits the points in the array into k clusters by nearest centre. One
label per row, in the order the points were given.
Details
k-means always produces exactly k clusters and no noise, so every point
gets a label. It favours round, similarly sized clusters; use ga_dbscan()
when the shapes are irregular or the count is unknown.
Clustering is over the whole array, not within each row, so k is a single
value rather than one per row. The algorithm starts from a random seed, so
results vary between runs unless seed is given. A row that is not a single
point, or is null, takes no part in the clustering and comes back null.
See also
Other cluster:
ga_dbscan(),
ga_outlier_scores()