as expectedthe algorithm recovers the clustering perfectly while the scikit-learn implementation of agglomerative clustering requires you to specify the number of clusters you want the algorithm to findagglomerative clustering methods provide some help with choosing the right numberwhich we will discuss next hierarchical clustering and dendrograms agglomerative clustering produces what is known as hierarchical clustering the clustering proceeds iterativelyand every point makes journey from being single point cluster to belonging to some final cluster each intermediate step provides clustering of the data (with different number of clustersit is sometimes helpful to look at all possible clusterings jointly the next example (figure - shows an overlay of all the possible clusterings shown in figure - providing some insight into how each cluster breaks up into smaller clustersin[ ]mglearn plots plot_agglomerative( unsupervised learning and preprocessing