juniorUnsupervised Learning
What is K-Means clustering?
Updated May 15, 2026
Short answer
K-Means partitions data into K clusters by minimizing distance to centroids.
Deep explanation
It iteratively assigns points to nearest centroid and updates centroid until convergence.
Real-world example
Image compression by grouping similar pixels.
Common mistakes
- Assuming it works well with non-spherical clusters.
Follow-up questions
- How are centroids initialized?
- What is inertia?