the set of points to be clustered
the DistanceFunction to use to compute distance between pairs of points
the maximum number of iterations to run k-means for
Given a sequence of centroids, compute the cluster memberships for each point.
Given a sequence of centroids, compute the cluster memberships for each point.
A set of points representing centroids.
A pair, the first element of which is the dispersion given these centroids, and the second of which is the list of centroid indices for each of the points being clustered (based on the nearest centroid to each).
Run the k-means algorithm starting from the given set of centroids.
Run the k-means algorithm starting from the given set of centroids.
A pair, the first element of which is the dispersion for the best set of centroids found, and the second element of which is that set of centroids.
Run the k-means algorithm on this set of points for some given k.
Run the k-means algorithm on this set of points for some given k.
The number of clusters to produce.
The number of times to run k-means from different random starting points.
A pair, the first element of which is the dispersion for the best set of centroids found, and the second element of which is that set of centroids.
A class for computing clusters for a set of points using k-means (specifically, Lloyd's algorithm).