figure - visualizing the hierarchical clustering dendrogram in the dendrogram depicted in figure - we can see how each data point starts as an individual cluster and slowly starts getting merged with other data points to form clusters on high level from the colors and the dendrogramyou can see that the model has correctly identified two major clusters if you consider distance metric of around or above leveraging this distancewe can get the cluster labels using the following code from scipy cluster hierarchy import fcluster max_dist hc_labels fcluster(zmax_distcriterion='distance'let' compare how the cluster outputs look based on the pca reduced dimensions as compared to the original label distribution (detailed code is in the notebooksee figure - figure - visualizing hierarchical clusters in the breast cancer dataset