maxfuse.metrics.get_matching_acc
- maxfuse.metrics.get_matching_acc(matching, labels1, labels2, order=None)[source]
Compute the cluster level matching accuracy.
- Parameters:
matching (a list of length three.) – The matched pairs are (matching[0][i], matching[1][i]), and its score (the higher, the better) is matching[2][i].
labels1 (np.array of shape (n_samples1,)) – The first label vector.
labels2 (np.array of shape (n_samples2,)) – The first label vector.
order (None or (1, 2) or (2, 1), default=None) – If None, then directly use matching without addressing any redundancy. If (1, 2), find one-to-one matching from the first dataset to the second dataset; if (2, 1), do the other way around.
- Returns:
Matching accuracy.