Skip to content
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

Add a 'scoring' argument to SplineCV #379

Closed
leouieda opened this issue Sep 1, 2022 · 0 comments · Fixed by #380
Closed

Add a 'scoring' argument to SplineCV #379

leouieda opened this issue Sep 1, 2022 · 0 comments · Fixed by #380
Labels
enhancement Idea or request for a new feature
Milestone

Comments

@leouieda
Copy link
Member

leouieda commented Sep 1, 2022

Description of the desired feature:

As pointed out in https://github.com/orgs/fatiando/discussions/61 by @JamesSample, the SplineCV class never got a scoring argument when it was added to cross_val_score. This means that it's impossible to set a custom scoring function or even prepare the code for the change coming in 2.0 (see #322).

We need to add a scoring parameter to SplineCV that defaults to None. It should be passed along to the call to cross_val_score here: https://github.com/fatiando/verde/blob/main/verde/spline.py#L225

The call above that doesn't need to be changed since the client argument is going away as well soon.

A test would be needed to make sure that the scores_ attribute match a negative MSE instead of R² when the argument is passed.

Are you willing to help implement and maintain this feature? Yes but happy for someone else to do this!

@leouieda leouieda added the enhancement Idea or request for a new feature label Sep 1, 2022
@leouieda leouieda added this to the 1.8.0 milestone Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Idea or request for a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant