large to be actually homogeneous to get more homogeneous clusterswe can run the algorithm againthis time with clustersand pick out some of the clusters that are particularly interesting (figure - )in[ ]extract clusters with ward agglomerative clustering agglomerative agglomerativeclustering(n_clusters= labels_agg agglomerative fit_predict(x_pcaprint("cluster sizes agglomerative clustering{}format(np bincount(labels_agg))n_clusters for cluster in [ ]hand-picked "interestingclusters mask labels_agg =cluster figaxes plt subplots( subplot_kw={'xticks'()'yticks'()}figsize=( )cluster_size np sum(maskaxes[ set_ylabel("#{}{}format(clustercluster_size)for imagelabelasdfax in zip(x_people[mask]y_people[mask]labels_agg[mask]axes)ax imshow(image reshape(image_shape)vmin= vmax= ax set_title(people target_names[labelsplit()[- ]fontdict={'fontsize' }for in range(cluster_size )axes[iset_visible(falseout[ ]cluster sizes agglomerative clustering unsupervised learning and preprocessing