k-Means
Definition
k-Means groups data into k clusters by iteratively assigning points to the nearest center and recalculating centers.
The method typically minimizes the sum of squared distances within clusters. Result and quality strongly depend on scaling, distance metric, k, and initialization.
Simply explained
Like always assigning points on a map to the nearest of k centers and then resetting the centers.
Why it matters in practice
Relevant for segmentation, exploratory analysis, and pre-grouping of numerical data.
Example from business
A company clusters standardized usage features to discover rough behavioral groups for further analysis.
Limits and pitfalls
- Interpreting clusters as ground truth; not scaling features; using categorical data unchecked; choosing k arbitrarily.
Origin & history
MacQueen coined the term k-means in 1967; Lloyd described a closely related algorithm for quantization in 1957/1982.
Use in mid-sized companies
- Possible application: exploratory grouping of data, examining typical representatives of groups, and narrowing anomalies for further checks.
Frequently asked questions
Does k-Means always find the global optimum?
No. Must k be chosen beforehand? Yes.
Sources
- Least Squares Quantization in PCM · Lloyd (1982), Least Squares Quantization in PCM
- KMeans · scikit-learn, KMeans
Sources checked on 10.10.2026.
Editorially reviewed on: