At the beginning of the process, each element is in a cluster of its own.
The method is also known as farthest neighbour clustering.
The result of the clustering can be visualized as a dendrogram, which shows the sequence of cluster fusion and the distance at which each fusion took place.
[1][2][3] At each step, the two clusters separated by the shortest distance are combined.
The definition of 'shortest distance' is what differentiates between the different agglomerative clustering methods.
The shortest of these links that remains at any step causes the fusion of the two clusters whose elements are involved.
Mathematically, the complete linkage function — the distance
where The following algorithm is an agglomerative scheme that erases rows and columns in a proximity matrix as old clusters are merged into new ones.
The complete linkage clustering algorithm consists of the following steps: The algorithm explained above is easy to understand but of complexity
In May 1976, D. Defays proposed an optimally efficient algorithm of only complexity
known as CLINK (published 1977)[4] inspired by the similar algorithm SLINK for single-linkage clustering.
The working example is based on a JC69 genetic distance matrix computed from the 5S ribosomal RNA sequence alignment of five bacteria: Bacillus subtilis (
This corresponds to the expectation of the ultrametricity hypothesis.
(see the final dendrogram) We then proceed to update the initial proximity matrix
(see below), reduced in size by one row and one column because of the clustering of
correspond to the new distances, calculated by retaining the maximum distance between each element of the first cluster
are not affected by the matrix update as they correspond to distances between elements not involved in the first cluster.
We now reiterate the three previous steps, starting from the new distance matrix
Because of the ultrametricity constraint, the branches joining
We deduce the missing branch length:
(see the final dendrogram) We then proceed to update the
(see below), reduced in size by one row and one column because of the clustering of
We again reiterate the three previous steps, starting from the updated distance matrix
(see the final dendrogram) There is a single entry to update:
We deduce the two remaining branch lengths:
Alternative linkage schemes include single linkage clustering and average linkage clustering - implementing a different linkage in the naive algorithm is simply a matter of using a different formula to calculate inter-cluster distances in the initial computation of the proximity matrix and in step 4 of the above algorithm.
An optimally efficient algorithm is however not available for arbitrary linkages.
The formula that should be adjusted has been highlighted using bold text.
Complete linkage clustering avoids a drawback of the alternative single linkage method - the so-called chaining phenomenon, where clusters formed via single linkage clustering may be forced together due to single elements being close to each other, even though many of the elements in each cluster may be very distant to each other.
Complete linkage tends to find compact clusters of approximately equal diameters.