diff --git a/sklearn/metrics/cluster/_supervised.py b/sklearn/metrics/cluster/_supervised.py index 3cf72ea3abaa0..60ed30f598287 100644 --- a/sklearn/metrics/cluster/_supervised.py +++ b/sklearn/metrics/cluster/_supervised.py @@ -254,6 +254,12 @@ def pair_confusion_matrix(labels_true, labels_pred): return C +@validate_params( + { + "labels_true": ["array-like"], + "labels_pred": ["array-like"], + } +) def rand_score(labels_true, labels_pred): """Rand index. diff --git a/sklearn/tests/test_public_functions.py b/sklearn/tests/test_public_functions.py index 95b9a131e5672..8289ec1afe7d0 100644 --- a/sklearn/tests/test_public_functions.py +++ b/sklearn/tests/test_public_functions.py @@ -229,6 +229,7 @@ def _check_function_param_validation( "sklearn.metrics.precision_recall_fscore_support", "sklearn.metrics.precision_score", "sklearn.metrics.r2_score", + "sklearn.metrics.rand_score", "sklearn.metrics.recall_score", "sklearn.metrics.roc_auc_score", "sklearn.metrics.roc_curve",