-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
FIX allows TransformedTargetRegressor to take nD target #18898
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 allows TransformedTargetRegressor to take nD target #18898
Conversation
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 think that we should still keep the check_array
as a safe guard for the moment. We can style accomodate your use case by allowing nd
array in check_array
. We can later see if we should do less validation and delegate the y
validation to the transformer itself.
Please add an entry to the change log at doc/whats_new/v*.rst
. Like the other entries there, please reference this pull request with :pr:
and credit yourself (and other contributors if applicable) with :user:
.
Hi @panangam would you be able to address the comments from the reviewer? Thanks! Feel free to ask if you need some clarifications. |
@glemaitre @cmarmo I know it's been forever but I've finally addressed the comment, bringing |
Hi @panangam thanks for your updates. 0.24 has been released in December 2020, do you mind moving your changelog in |
Oh whoa, we're getting to 1.0? Will do! |
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
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.
Thank you for the PR @panangam !
LGTM
…#18898) Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Reference Issues/PRs
Fixes #18866
What does this implement/fix? Explain your changes.
This removes check_array call from the fit method of TransformedTargetRegressor and relegate target validation to the transformer. The main motivation was the allow nD target to be used. But this also potentially allows transformers that deal with string or other data types to be used.
Any other comments?
This is my first scikit-learn PR so any feedback welcome!