liveBook · Manning

Linkage criterion

As explained in Data Without Labels

A linkage criterion is a rule that defines the distance between clusters for hierarchical clustering.

A linkage criterion defines the distance between clusters during hierarchical clustering. Each criterion changes which observations are merged as the algorithm builds the hierarchy. section 2.4.2 section 2.10

Common choices include:

  • Single linkage uses the greatest proximity between clusters by considering their closest neighboring objects. section 2.4.2
  • Complete linkage uses the greatest distance between two objects in different clusters. section 2.4.2
  • Group average linkage averages distances across all possible object pairs in two clusters. section 2.4.2
  • Ward linkage minimizes the variability of clusters merged into one. section 2.4.2

Comparing linkage methods in Python

Create hierarchical clusterings from standardized data with SciPy using average, Ward, and complete linkage, then plot each dendrogram. Select a distance threshold, use fcluster with criterion="distance", and plot the resulting labels. Test several distance values because both the number and shape of clusters can change. section 2.4.5

Figure 2.18 Single linkage is for closest neighbors (left); complete linkage is for farthest neighbors (center); and group average is for the average of the distance between clusters (right).
figure

Compare the geometric intuition behind single, complete, and group average linkage. section 2.4.2

How Data Without Labels covers it

How deep it goes
Defines four linkage choices and demonstrates their Python use, while deferring broader linkage theory.
Examples
Uses single, complete, average, and Ward linkage with SciPy dendrograms, distance thresholds, cluster labels, and scatter plots.
What it assumes
Assumes familiarity with hierarchical clustering, distances, dendrograms, and standardized feature data.
What you can do after
Apply it via SciPy to compare hierarchical clusterings and inspect how distance thresholds alter cluster assignments.
How it connects
Connects hierarchical clustering with distance metrics, dendrograms, hyperparameters, and cluster-count selection.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data Without Labels. The section links point to the parts of the book it draws on.