diff --git a/sklearn/metrics/_scorer.py b/sklearn/metrics/_scorer.py index fcf3147eb199b..9df1b482bdeb3 100644 --- a/sklearn/metrics/_scorer.py +++ b/sklearn/metrics/_scorer.py @@ -608,6 +608,14 @@ def _check_multimetric_scoring(estimator, scoring): return scorers +@validate_params( + { + "score_func": [callable], + "greater_is_better": ["boolean"], + "needs_proba": ["boolean"], + "needs_threshold": ["boolean"], + } +) def make_scorer( score_func, *, diff --git a/sklearn/tests/test_public_functions.py b/sklearn/tests/test_public_functions.py index 3e2b0943a2eea..12e0c7ee857a3 100644 --- a/sklearn/tests/test_public_functions.py +++ b/sklearn/tests/test_public_functions.py @@ -135,6 +135,7 @@ def _check_function_param_validation( "sklearn.metrics.jaccard_score", "sklearn.metrics.label_ranking_loss", "sklearn.metrics.log_loss", + "sklearn.metrics.make_scorer", "sklearn.metrics.matthews_corrcoef", "sklearn.metrics.max_error", "sklearn.metrics.mean_absolute_error",