You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Change the default of *SearchCV's error_score to np.nan #10309
It can be pretty unpleasant when your grid search fails. That's why the error_score parameter was introduced. The default error_score='raise' helps make absolutely clear that there was a failure by terminating the program, but it might be kind to just set the score to NaN and raise a warning. We could consider deprecating it:
change the default temporarily to error_score='raise-deprecating'
continue to raise an error with 'raise-deprecating' but also warn that in the future, this error will not be raised, and the user can choose between error_score='raise' or the new default, error_score=np.nan.
change the default to error_score=np.nan in a couple of versions time
Other devs may want to give feedback on this idea before we go ahead with implementation/merge.
Well, I suppose we'd better be careful when sorting scores to watch out for NaNs (I doubt we check this case atm)... and to raise an error if the best_estimator_ has a NaN score. We could use -np.inf instead so that we get sorting for free.
Activity
amueller commentedon Dec 14, 2017
What happens for the refit? Do we just exclude the failed ones and warn about it?
jnothman commentedon Dec 15, 2017
Well, I suppose we'd better be careful when sorting scores to watch out for NaNs (I doubt we check this case atm)... and to raise an error if the
best_estimator_has a NaN score. We could use-np.infinstead so that we get sorting for free.uwaisiqbal commentedon Dec 17, 2017
I'd like to take this on if that's ok. I'm a new contributor and would like to get my first PR in 🙌
jnothman commentedon Dec 17, 2017
mohdsanadzakirizvi commentedon Dec 25, 2017
is this issue open to be worked on?
jnothman commentedon Dec 25, 2017
Well @Oasis789 has not yet opened a PR
GKjohns commentedon Jan 22, 2018
@Oasis789 any word on this? I can take it over if you're swamped with other stuff
uwaisiqbal commentedon Jan 22, 2018
I should be able to do it this weekend. Planned to work on it over Christmas but fell it.
rotuna commentedon Feb 2, 2018
Could I please try to work on this, if it's open to be worked on?
jnothman commentedon Feb 3, 2018
@Oasis789, if you have not started work sufficiently, perhaps you should say so and let someone else take it...?
uwaisiqbal commentedon Feb 3, 2018
Currently working on this. Should have a PR open soon.
uwaisiqbal commentedon Feb 4, 2018
I've opened a PR for this issue #10583
Please have a look