-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cast cross_val_score as a numpy.array #160
Conversation
💖 Thanks for opening this pull request! 💖 Please make sure you read our Contributing Guide and abide by our Code of Conduct. A few things to keep in mind:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting @Goto15! Just need a quick fix for the test and everything else should work. Good job!
verde/model_selection.py
Outdated
@@ -158,7 +158,7 @@ def cross_val_score(estimator, coordinates, data, weights=None, cv=None, client= | |||
>>> data = 10 - coords[0] + 0.5*coords[1] | |||
>>> # A linear trend should perfectly predict this data | |||
>>> scores = cross_val_score(Trend(degree=1), coords, data) | |||
>>> print(', '.join(['{:.2f}'.format(score) for score in scores])) | |||
>>> print('{:.2f}'.format(scores), sep = ", ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
>>> print('{:.2f}'.format(scores), sep = ", ") | |
>>> print(', '.join(['{:.2f}'.format(score) for score in scores])) |
We can keep the same test and it should work.
I reverted the requested code, but might have accidentally committed the change twice. My bad. |
🎉🎉🎉 Congrats on merging your first pull request and welcome to the team! 🎉🎉🎉 Please open a new pull request to add yourself to the |
No problem, we've all done this at some point 🙂 Thanks for contributing! It's much appreciated 🎉🎉🎉 |
In order to allow the use of mean(), cast the cross_val_score return data structure as a numpy.array. Also changed the in code comments to reflect the new return data structure.
Fixes #155