11
$\begingroup$

Even if I don't define the scoring parameter, it scores and makes a decision for best estimator, but documentation says the default value for scoring is "None", so what is it using to score when I don't define a metric or list of metrics?

$\endgroup$

1 Answer 1

8
$\begingroup$

From the User Guide:

By default, parameter search uses the score function of the estimator to evaluate a parameter setting. These are the sklearn.metrics.accuracy_score for classification and sklearn.metrics.r2_score for regression...

$\endgroup$
2
  • $\begingroup$ Thank you, I didn't know they had defaults in function of classificator or regressor, just seeing "score" was driving me mad. Deep dive into he documentation is needed. $\endgroup$
    – TwoPointNo
    Commented May 11, 2021 at 23:29
  • $\begingroup$ Each estimator's score docstring says what it measures. But classifiers and regressors consistently use accuracy and r2, respectively. $\endgroup$
    – Ben Reiniger
    Commented May 12, 2021 at 1:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.