From a62775e99f2a5ea3d51db7160fad783f6cd8a4c5 Mon Sep 17 00:00:00 2001 From: Bharat Raghunathan Date: Thu, 14 Mar 2019 14:37:47 +0530 Subject: [PATCH] DOC Add scoring metric info in cross_val_score (#13445) --- sklearn/model_selection/_validation.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sklearn/model_selection/_validation.py b/sklearn/model_selection/_validation.py index c0eb1ef98f9..ae1389a377e 100644 --- a/sklearn/model_selection/_validation.py +++ b/sklearn/model_selection/_validation.py @@ -281,7 +281,13 @@ def cross_val_score(estimator, X, y=None, groups=None, scoring=None, cv='warn', scoring : string, callable or None, optional, default: None A string (see model evaluation documentation) or a scorer callable object / function with signature - ``scorer(estimator, X, y)``. + ``scorer(estimator, X, y)`` which should return only + a single value. + + Similar to :func:`cross_validate` + but only a single metric is permitted. + + If None, the estimator's default scorer (if available) is used. cv : int, cross-validation generator or an iterable, optional Determines the cross-validation splitting strategy.