2
$\begingroup$

How is the score of GridsearchCV calculated? Is the score a percentage? Does this mean higher is a better?

$\endgroup$
3
$\begingroup$

The score is based on the scorer defined in the scoring argument. Meaning, the scorer can be any of the default metrics, such as precision, accuracy or F1-score (e.g., this); or a custom scorer. For a scorer (by convention), higher value is better. The value is not necessarily a percentage, but is often normalized between 0 and 1.

$\endgroup$
  • $\begingroup$ I create a Gradient Boost Regressor with a GridSearchcv but dont define the score. Whta does the score mean by default? $\endgroup$ – ml_learner Feb 11 '20 at 13:43
  • 1
    $\begingroup$ If None, the estimator’s score method is used. This means in your case the Gradient Boost Regressor default scorer is used (that is coefficient R^2) $\endgroup$ – Felix Z. Feb 11 '20 at 13:48
  • $\begingroup$ and r² is not a percentage? $\endgroup$ – ml_learner Feb 11 '20 at 14:00
  • 2
    $\begingroup$ By convention, we use word score when higher is better. We use word loss when less is better. When you don't have any particular in mind, use metric. $\endgroup$ – Piotr Rarus - Reinstate Monica Feb 11 '20 at 14:53
  • 1
    $\begingroup$ @ml_learner r2 is not percentage (and it's not r-squared). It's 'kinda' normalized, but you can use it to compare models just fine. 1.0 - is perfect model 0.0 - this is constant answer model <0.0 - model goes wrong $\endgroup$ – Piotr Rarus - Reinstate Monica Feb 11 '20 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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