@@ -159,7 +159,7 @@ def contingency_matrix(
159
159
160
160
161
161
def pair_confusion_matrix (labels_true , labels_pred ):
162
- """Pair confusion matrix arising from two clusterings.
162
+ """Pair confusion matrix arising from two clusterings [1]_ .
163
163
164
164
The pair confusion matrix :math:`C` computes a 2 by 2 similarity matrix
165
165
between two clusterings by considering all pairs of samples and counting
@@ -188,9 +188,15 @@ def pair_confusion_matrix(labels_true, labels_pred):
188
188
189
189
See Also
190
190
--------
191
- rand_score: Rand Score
192
- adjusted_rand_score: Adjusted Rand Score
193
- adjusted_mutual_info_score: Adjusted Mutual Information
191
+ rand_score: Rand Score.
192
+ adjusted_rand_score: Adjusted Rand Score.
193
+ adjusted_mutual_info_score: Adjusted Mutual Information.
194
+
195
+ References
196
+ ----------
197
+ .. [1] :doi:`Hubert, L., Arabie, P. "Comparing partitions."
198
+ Journal of Classification 2, 193–218 (1985).
199
+ <10.1007/BF01908075>`
194
200
195
201
Examples
196
202
--------
@@ -211,12 +217,6 @@ def pair_confusion_matrix(labels_true, labels_pred):
211
217
[0, 2]]...
212
218
213
219
Note that the matrix is not symmetric.
214
-
215
- References
216
- ----------
217
- .. L. Hubert and P. Arabie, Comparing Partitions, Journal of
218
- Classification 1985
219
- https://link.springer.com/article/10.1007%2FBF01908075
220
220
"""
221
221
labels_true , labels_pred = check_clusterings (labels_true , labels_pred )
222
222
n_samples = np .int64 (labels_true .shape [0 ])
0 commit comments