if labels[ = ax scatter(bc_pca[ , ]bc_pca[ , ], =' 'marker='if labels[ = ax scatter(bc_pca[ , ]bc_pca[ , ], =' 'marker=' ax legend([ ][' '' '] ax legend([ ][' '' ']figure - visualizing clusters in the breast cancer dataset from figure - you can clearly see that the clustering has worked quite well and it shows distinct separation between clusters with labels and and is quite similar to the actual labels however we do have some overlap where we have mislabeled some instanceswhich is evident in the plot on the right remember in an actual real-world scenarioyou will not have the actual labels to compare with and the main idea is to find structures or patterns in your data in the form of these clusters another very important point to remember is that cluster label values have no significance the labels and are just values to distinguish cluster data points from each other if you run this process againyou can easily obtain the same plot with the labels reversed hence even when dealing with labeled data and running clustering do not compare clustered label values with actual labels and try to measure accuracy also another important note is that if we had asked for more than two clustersthe algorithm would have readily supplied more clusters but it would have been hard to interpret those and many of them would not make sense henceone of the caveats of using the -means algorithm is to use it in the case where we have some idea about the total number of clusters that may exist in the data