Skip to content
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

[MGR] TransformedTargetRegressor passes fit_params to regressor #14890

Merged

Conversation

mfcabrera
Copy link
Contributor

@mfcabrera mfcabrera commented Sep 5, 2019

Reference Issues/PRs

Fixes #13349

What does this implement/fix? Explain your changes.

Originally TransformedTargetRegressor only passed sample_weight to the fit method of the underlying regressor. However This regressor might have other parameters and could theoretically even be a pipeline. With this change you can pass arbitrary paramter to it.

Copy link
Member

@jnothman jnothman left a comment

Why WIP? Is there work you still expect to do for this to be a complete contribution?

Please add an Enhancement entry to the change log at doc/whats_new/v0.22.rst. Like the other entries there, please reference this pull request with :pr: and credit yourself (and other contributors if applicable) with :user:

ogrisel
ogrisel approved these changes Sep 6, 2019
Copy link
Member

@ogrisel ogrisel left a comment

LGTM. Do you still have changes to add to this PR in mind? If not you can rename the title of the PR from [WIP] (Work in Progress) to [MRG] (ready to merge).

@mfcabrera mfcabrera changed the title [WIP] TransformedTargetRegressor passes fit_params to regressor [MGR] TransformedTargetRegressor passes fit_params to regressor Sep 6, 2019
@ogrisel ogrisel merged commit a1f514f into scikit-learn:master Sep 6, 2019
18 checks passed
@antoinedemathelin
Copy link

@antoinedemathelin antoinedemathelin commented Sep 13, 2019

Hi, would it be useful to do the same on the predict method? (add the possibility to pass **predict_params to the predict). I am using TransformedTargetRegressor in the case where the underlying regressor is a Pipeline which can take **predict_params .

@jnothman
Copy link
Member

@jnothman jnothman commented Sep 14, 2019

@antoinedemathelin
Copy link

@antoinedemathelin antoinedemathelin commented Sep 16, 2019

Here's my attempt to help you: #14992

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants