I don’t know if the email was successfully sent last time. I send it again
now. I’m sorry to disturb you.

---------- Forwarded message ---------
发件人: Haylee Miller <mh.nw...@gmail.com>
Date: 2021年12月24日周五 21:17
Subject: There is a problem with using "r2" to calculate cross_val_score
and GridSearchCV scores
To: <scikit-learn@python.org>


Dear sklearn developers:

First of all, thank you for developing this module, it is very useful.
However, recently we found a small problem in the use of cross_val_score
and GridSearchCV.
Using "scoring = ‘r2’" to calculate the cross_val_score and GridSearchCV
scores is inconsistent with the result calculated using "metrics.r2_score".
[image: 5.png]
According to the principle of k-fold cross-validation, we performed manual
3-fold cross-validation and there was a big gap between the score and the
result of cross_val_score.
Below is the code and results of our manual verification process.
[image: 1.png]
[image: 2.png]

[image: 3.png][image: 4.png]

Theoretically, the three values in results 1-3 should be similar to the
three values in cross_val_score 1 and cross_val_score 2.
However, only the first value in cross_val_score 1 and cross_val_score 2 is
close to the result 1-3 in  figures.
Why is this so, looking forward to your reply!
Finally, Merry Christmas!

Best wishes,
Ma Hui
_______________________________________________
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn

Reply via email to