FIX reshape the predicitons array shape in IterativeImputer#19409
FIX reshape the predicitons array shape in IterativeImputer#19409isaacknjama wants to merge 17 commits intoscikit-learn:mainfrom isaacknjama:imputer-reshape
Conversation
jjerphan
left a comment
There was a problem hiding this comment.
What is the motive for using pytest context managers instead of sklearn.utils._testing.assert_raises?
It is more intuitive and readable since you have the real function call instead of wrapping the function and the parameter within another testing function. The linked issue is wrong in the summary is wrong, I will correct it. |
glemaitre
left a comment
There was a problem hiding this comment.
As a general comment, when you start to make a PR, you should create a branch from the main branch such that no changes from other branches are already inside it.
|
Please add an entry to the change log at |
I see, I thought using |
|
it was before pytest was adopted :) |
|
#DataUmbrella sprint |
@glemaitre Thank you. I'll keep that in mind. |
|
Hi @icky254 Why have you closed this PR? You were on a nice start. 🙂 |
|
@icky254 are you still interested in finalizing this PR by addressing the remaining comments above? Let us know if something is not clear. |
|
@ogrisel I will finalize the PR. Thanks for the reminder. |
|
@icky254 How is this PR going? Please let us know if we can answer any questions. cc: @reshamas |
This reverts commit cfc8f28.
|
The conflicting file in sklearn/tests/test_dummy.py causes builds to my PR to fail. I don't think it's required for this PR. How can I trace the commit that had the changes to the file? |
doc/whats_new/v1.0.rst
Outdated
| - |Fix| Fix ValueError triggered when setting the estimator as PLSRegression() in | ||
| :class: `sklearn._iterative.py: func: _impute_one_feature` |
There was a problem hiding this comment.
Maybe a higher-level entry might be clearer to users?
| - |Fix| Fix ValueError triggered when setting the estimator as PLSRegression() in | |
| :class: `sklearn._iterative.py: func: _impute_one_feature` | |
| - |Fix| :class:`cross_decomposition.PLSRegression` can now be used as an estimator for | |
| :class:`impute.IterativeImputer`. |
There was a problem hiding this comment.
And we will need a non-regression test that should ensure that it is actually working in this PR while failing in the branch main
There was a problem hiding this comment.
I got back to the original issue, and it looks like some issues (like SkuaD01/scikit-learn#1) implemented a test for this.
@isaack-mungui and @SkuaD01: you probably can work together to have your changes integrated in mean. 🙂
There was a problem hiding this comment.
@jjerphan Just to gain clarity, should I integrate changes in mean or follow through with @glemaitre's requested changes first?
There was a problem hiding this comment.
You can proceed with @glemaitre's request (I misspelled main and wrote mean).
There was a problem hiding this comment.
Got it. Thanks!
doc/whats_new/v1.0.rst
Outdated
| - |Fix| Fix ValueError triggered when setting the estimator as PLSRegression() in | ||
| :class: `sklearn._iterative.py: func: _impute_one_feature` |
There was a problem hiding this comment.
And we will need a non-regression test that should ensure that it is actually working in this PR while failing in the branch main
|
@isaack-mungui |
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
@reshamas Noted, thanks. |
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
jjerphan
left a comment
There was a problem hiding this comment.
LGTM, thanks @isaack-mungui!
Thanks for the feedback. @jjerphan |
|
@glemaitre do you mind having a look here to check if your requested changes have been applied? Thanks! |
@cmarmo I'll do that ASAP. Thank you for the update! |
Reference Issues/PRs
Fixes #19352
What does this implement/fix? Explain your changes.
Fixes ValueError triggered when setting the estimator as PLSRegression().