How it works...

In agglomerative clustering, each observation begins in its cluster and the clusters are subsequently combined. The strategies for joining the clusters are as follows:

  • Ward clustering minimizes the sum of squared differences within all the clusters.
  • Maximum or complete linkage is used to minimize the maximum distance between observations of pairs of clusters.
  • Average linkage is used to minimize the average of the distances between all observations of pairs of clusters.
  • Single linkage is used to minimize the distance between the closest observations of pairs of clusters.