0
$\begingroup$

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:

Ground truth

Ground truth

Labels by Kmeans

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?

$\endgroup$
0
$\begingroup$

Implement the

Hungarian matching algorithm

It will find the best mapping.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.