public class KMeans
extends Object
| Constructor and Description |
|---|
KMeans() |
| Modifier and Type | Method and Description |
|---|---|
static Point |
calculateCentroid(List<Point> cluster) |
static Map<Point,List<Point>> |
kmeansClustering(Collection<Point> points,
int k,
int maxIters)
Given a collection of points, this will partition the point set into k
clusters.
|
public static Map<Point,List<Point>> kmeansClustering(Collection<Point> points, int k, int maxIters)
points - The set of points to partition.k - The number of desired clustersmaxIters - The maximum number of iterations to run before achieving
convergence.