There are two approaches to hierarchical clustering:
- In agglomerative hierarchical clustering, we start with each data point potentially being its own cluster, and we subsequently merge the closest pair of clusters until only one cluster remains.
- In divisive hierarchical clustering, it's the other way around: We start by assigning all the data points to one and the same cluster, and we subsequently split the cluster into smaller clusters until each cluster only contains one sample.
Of course, we can specify the number of desired clusters if we wish to. In the following figure, we asked the algorithm to find a total of three clusters:
Step-by-step example of agglomerative hierarchical clustering
In ...