I am trying to do clustering in my dataset which has 4 numerical fields. Please find the file attached : http://www.filedropper.com/example_3
I tried with this code:
from sklearn.cluster import KMeans kmeans = KMeans(n_clusters=2, random_state=0, max_iter = 300).fit(dffinal)
I know that there are 2 classes in this example, that was the reason i tried with 2 clusters. Out of 4200 rows, first 3196 rows belong to a class and the remaining rows belong to an another class.
But when i do clustering, cluster labels are randomly assigned, and accuracy is less than 10%. Just wondering whether my features are not good enough for clustering or should I try with some other clustering algorithm.
Any help would be appreciated. Thanks.