-
-
Notifications
You must be signed in to change notification settings - Fork 26k
FIX Fix properly convert cv_results_ values to numpy array #19211
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
Conversation
We discuss with @ogrisel and it is not critical for 0.24.1 but we will include it in the upcoming 0.24.2. |
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.
In general this looks like a common test for *SearchCV.cv_results_
, but we can do that in a future PR.
I don't think this needs to be release critical: it's an experimental API
|
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.
Move the whats new to 0.24.2. LGTM on my end.
@glemaitre easy review?
for key, val in results.items(): | ||
# each value is a list (as per evaluate_candidate's convention) | ||
# we convert it to an array for consistency with the other keys | ||
results[key] = np.asarray(val) |
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.
I updated this to use asarray
so we do not make a copy if val
is already an 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.
LGTM
…cikit-learn#19211) Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
…cikit-learn#19211) Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
…19211) Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Fixes #19203
Some values in the
cv_results_
attribute of the SH estimators where lists instead of numpy arrays.CC @glemaitre as this might be release-critical?