K-Means

Also known as · clustering

A centroid-based clustering algorithm that partitions the points into exactly K clusters: initialise K centroids, assign each point to the nearest, move each centroid to the mean of its points, and repeat until assignments stop changing.

When to use

Feature Scaling first, choose K with the Elbow Method and Silhouette Score, and run with n_init=10. It must be given K in advance, assumes spherical clusters, and is sensitive to outliers.

See DS Lec 5.

Appears in