-
Notifications
You must be signed in to change notification settings - Fork 839
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
Fix: Using gridsearch with use_fitted_values=True raises unexpected error #2222
Conversation
…ce of the fitted_values attribute
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #2222 +/- ##
==========================================
- Coverage 93.88% 93.85% -0.03%
==========================================
Files 135 135
Lines 13429 13419 -10
==========================================
- Hits 12608 12595 -13
- Misses 821 824 +3 ☔ View full report in Codecov by Sentry. |
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 @madtoinou for this 🚀
Should we allow for np arrays as well for the params values?
Also this introduces breaking changes that we need to list in the changelog:
- will raise an error now if params values are not list (or np ndarray)
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.
Looks great, thanks a lot @madtoinou 🚀
Summary
When using
gridsearch()
withuse_fitted-values=True
, the model is not properly created to check if it indeed has the attributefitted_values
(due to incorrectly assuming that the class had default arguments).Other Information
Added a check to ensure that each values in the
parameters
dictionary is indeed a list otherwise theitertools.product
will fail.