I have two arrays which are outputs of a clustering algorithm. Is there a possibility of an automatic way to find the associative mapping.
Consider two label arrays:
array1 = [0,0,1,2,3]
array2 = [4,4,6,8,7]
Visually these look the same, but for a larger label set, I want to find a mapping like {0:4,1:6,2:8,3:7}.
Does Python have any method to do this?
I have looked at sklearn metrics for similar solution, no luck yet. Any help would be appreciated.