the mean points when printed appear as follows[ [- - ]each data point in original_set will belong to cluster after our -means algorithm has finished its training the -mean algorithm represents the two clusters it discovers as and if we had asked the algorithm to cluster the data into fourthe internal representation of these clusters would have been and to print out the various clusters that each dataset belongs towe do the followingprint(kmean labels_this gives the following output[ there are and each shows the cluster that each data point falls under by using matplotlib pyplotwe can chart the points of each group and color it appropriately to show the clustersimport matplotlib pyplot as plt for in set(kmean labels_)index kmean labels_ = plt plot(original_set[index, ]original_set[index, ]' 'index kmean labels_ = is nifty way by which we select all points that correspond to the group when = all points belonging to the group are returned to index it' the same for index = and so on plt plot(original_set[index, ]original_set[index, ]' 'then plots these data points using as the character for drawing each point nextwe will plot the centroids or mean values around which the clusters have formedplt plot(kmean cluster_centers_[ ][ ],kmean cluster_centers_[ ][ ]'*' =' 'ms= plt plot(kmean cluster_centers_[ ][ ],kmean cluster_centers_[ ][ ]'*' =' 'ms= lastlywe show the whole graph with the two means illustrated by starplt show(