Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@barrycg
Copy link
Contributor

@barrycg barrycg commented Aug 4, 2019

The code in examples/linear_model/plot_ols.py was not in accordance with its annotation. Although r2_score and explained_variance_score are mutually replaceable and they even have the same value in some models, they are not the same thing.

@NicolasHug
Copy link
Member

I guess we should just explicitly use r2 then? That's usually more common for such simple examples

@barrycg
Copy link
Contributor Author

barrycg commented Aug 5, 2019

Hmmm, you are right! I didn't think through that. r2_score is more suitable than the other in such a case.

@NicolasHug NicolasHug merged commit 58e8a43 into scikit-learn:master Aug 5, 2019
@NicolasHug
Copy link
Member

Thanks @barrycg, and good catch!

@barrycg barrycg deleted the correcting_the_examples branch August 5, 2019 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants