Dictionary of Applied Machine Learning
Updated on 2026-09-06
Typeset PDF version — the authoritative form of this entry
Python demo — a script that recomputes what this entry states and prints one line per check
Clustering decomposes a dataset without labels into a small number of subsets, called clusters, such that data points within the same cluster are more similar to each other than to data points in other clusters. It is a prototypical instance of unsupervised learning. Clustering methods differ in the measure of similarity between data points and in the representation of a cluster: a cluster centroid in $k$-means, a multivariate normal distribution in a Gaussian mixture model (GMM). They also differ in whether each data point is assigned to exactly one cluster (hard clustering) or to several with varying degrees (soft clustering). When the dataset is a graph, graph clustering partitions its nodes into densely connected subsets.
A retailer with millions of customer records has no predefined categories but still wants to group customers with similar purchasing behavior so that marketing campaigns can be targeted. Clustering addresses this type of problem: given a dataset without labels, decompose it into a small number of subsets, called clusters, such that data points within the same cluster are more similar to each other than to data points in other clusters. Clustering is a prototypical instance of unsupervised learning.
Different clustering algorithms differ in three design choices:
Fig. 1 illustrates the application
of clustering to the pixels of a smartphone snapshot
(Fig. 1-(a)) and to a toy
graph (Fig. 1-(d)).
Fig. 1-(b) shows the
result of hard clustering, which partitions the pixels
into disjoint regions. Fig. 1-(c)
illustrates soft clustering, which assigns each pixel
a vector of membership probabilities and produces
graded transitions. Fig. 1-(d)
depicts how graph clustering partitions a graph
into densely connected subsets of nodes.
pythondemos/clustering.py
Synonyms: segmentation.
See also: cluster, cluster centroid, $k$-means, hard clustering, soft clustering, Gaussian mixture model, graph clustering, unsupervised learning.
@misc{dictml_clustering,
author = {Jung, Alexander and Olioumtsevits, Konstantina and Schnoor, Ekkehard},
title = {clustering},
howpublished = {Dictionary of Applied Machine Learning (course edition)},
year = {2026},
doi = {10.5281/zenodo.21569296},
note = {ISBN 978-952-64-3013-3, CC BY 4.0, retrieved 2026-09-11},
url = {https://dictionaryofml.org/terms/clustering.html}
}