Clustering
Grouping similar data points together without any labels.
Clustering is unsupervised: it finds groups in data that has no answers attached. Different algorithms assume different shapes of groups:
- k-means: compact, round clusters; you choose k.
- Hierarchical: a tree of nested clusters (dendrogram).
- DBSCAN: dense regions of any shape, with outliers marked as noise.
- Gaussian mixtures: soft, elliptical clusters with probabilities.
- Spectral: clusters defined by graph connectivity.
Uses include customer segmentation, grouping documents and image segmentation.
See it in action
- k-means clusteringFind k groups by alternating between assigning points to centroids and moving centroids to means.
- Hierarchical clusteringBuild a tree of nested clusters by repeated merging, and read it as a dendrogram.
- DBSCAN (density-based clustering)Clusters as dense regions: arbitrary shapes, no k, and outliers labelled as noise.
- Gaussian mixtures and the EM algorithmModel data as a mix of Gaussians: soft, elliptical clusters fitted by expectation–maximisation.
- Spectral clusteringCluster the similarity graph, not the raw space: Laplacians, eigenvectors and normalised cuts.