num_samplesnum_features vectorized shape print("#samples% #features% (num_samplesnum_features)#samples #features we now have pool of , posts and extracted for each of them feature vector of , dimensions that is what kmeans takes as input we will fix the cluster size to for this and hope you are curious enough to try out different values as an exerciseas shown in the following codenum_clusters from sklearn cluster import kmeans km kmeans(n_clusters=num_clustersinit='random'n_init= verbose= km fit(vectorizedthat' it after fittingwe can get the clustering information out of the members of km for every vectorized post that has been fitthere is corresponding integer label in km labels_km labels_ array([ ]km labels_ shape ( ,the cluster centers can be accessed via km cluster_centers_ in the next section we will see how we can assign cluster to newly arriving post using km predict solving our initial challenge we now put everything together and demonstrate our system for the following new post that we assign to the variable new_postdisk drive problems hii have problem with my hard disk after year it is working only sporadically now tried to format itbut now it doesn' boot any more any ideasthanks