agglomerative clustering refers to collection of clustering algorithms that all build upon the same principlesthe algorithm starts by declaring each point its own clusterand then merges the two most similar clusters until some stopping criterion is satisfied the stopping criterion implemented in scikit-learn is the number of clustersso similar clusters are merged until only the specified number of clusters are left there are several linkage criteria that specify how exactly the "most similar clusteris measured this measure is always defined between two existing clusters the following three choices are implemented in scikit-learnward the default choiceward picks the two clusters to merge such that the variance within all clusters increases the least this often leads to clusters that are relatively equally sized average average linkage merges the two clusters that have the smallest average distance between all their points complete complete linkage (also known as maximum linkagemerges the two clusters that have the smallest maximum distance between their points ward works on most datasetsand we will use it in our examples if the clusters have very dissimilar numbers of members (if one is much bigger than all the othersfor example)average or complete might work better the following plot (figure - illustrates the progression of agglomerative clustering on two-dimensional datasetlooking for three clustersin[ ]mglearn plots plot_agglomerative_algorithm( unsupervised learning and preprocessing