Clustering
Grouping similar points and judging the result.
Clustering groups data points so that points in the same cluster are similar and points in different clusters are not — with no labels to say what the groups should be.
Uses: customer segmentation, grouping news articles by topic, finding cell types in gene-expression data, compressing images by grouping similar colours, and as a first look at any new dataset.
Because there are no labels, judging a clustering is tricky. Internal measures use only the data: the silhouette score compares each point's average distance to its own cluster () with its distance to the nearest other cluster ():
Near 1: well clustered; near 0: on a border; negative: probably in the wrong cluster. External measures (adjusted Rand index, mutual information) compare against known labels when you have them for testing.
Formula to remember
k-means objective
Within-cluster sum of squares.