In the previous chapters, we analyzed clustering algorithms, where the output is a single segmentation based either on a predefined number of clusters or the result of a parameter set and a precise underlying geometry. On the other hand, hierarchical clustering generates a sequence of clustering configurations that can be arranged in the structure of a tree. In particular, let's suppose that we have a dataset, X, containing n samples:
An agglomerative approach starts by assigning each sample to a cluster, Ci, and proceeds by merging two clusters at each step until a single final cluster (corresponding to X) has been produced:
In the preceding example, the clusters Ci and Cj are merged into Ck; hence, we obtain n-1 clusters in the second step. The process continues until the two remaining clusters are merged into a single block containing the whole dataset...