pair_confusion_matrix
- sklearn.metrics.cluster.pair_confusion_matrix(labels_true, labels_pred)
Pair confusion matrix arising from two clusterings.
The pair confusion matrix computes a 2 by 2 similarity matrix between two clusterings by considering all pairs of samples and counting pairs that are assigned into the same or into different clusters under the true and predicted clusterings [1].
Considering a pair of samples that is clustered together a positive pair, then as in binary classification the count of true negatives is , false negatives is , true positives is and false positives is .