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

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@antoinedemathelin
Copy link

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 commented Sep 14, 2019 via email

@antoinedemathelin
Copy link

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.

Fitting TransformedTargetRegressor with sample_weight in Pipeline
4 participants