AI Glossary

K-Means Clustering

A simple, widely-used clustering algorithm that partitions data into K groups by iteratively assigning points to their nearest cluster center and updating centers.

Algorithm

1. Initialize K cluster centers (randomly or via K-means++). 2. Assign each point to the nearest center. 3. Recompute centers as the mean of assigned points. 4. Repeat until convergence.

Limitations

Must specify K in advance. Assumes spherical, equally-sized clusters. Sensitive to initialization (K-means++ helps). Doesn't handle outliers well. For non-spherical clusters, use DBSCAN or spectral clustering.

← Back to AI Glossary

Last updated: March 5, 2026