I am working on the problem of speaker clustering. I am using kmeans clustering. The ground truth cluster values and kmean cluster values do not correspond due to different methods of labelling(manually labelled for ground truthand via scikit's kmeans function). So I need to find all permutations of matching values and choose the matching values with the highest percentage of match/correctness. I have a ground truth npy array and a labels_by_kmeans npy array as shown below:
Labels by Kmeans
As you can see, arrays 0 and 2 in both tables have 0s and 2s,3s that correspond to each other. However, in array 1 5s seems to corresponds to 0s. i am trying to find the best fit for 0s in ground truth in Labels by kmeans. how can i do this via code?