Expand description
k-means clustering (ISL ch 12.4, PRML ch 9.1) — Lloyd’s algorithm with k-means++ seeding, over a row-major feature matrix.
Assign each point to its nearest centroid (squared Euclidean), recompute each
centroid as the mean of its members, repeat to convergence. k-means++ seeding
spreads the initial centroids to avoid poor local minima. Kernel-class
AllPairs (the point↔centroid distances), dispatch-ready; deterministic given
the seed.
Structs§
- KMeans
Model - A fitted k-means model.
Functions§
- fit
- Fit k-means with
kclusters. Fails closed:InvalidDimension,InsufficientData(k == 0ork > n).