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 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 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 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
18 checks passed
LGTM analysis: C/C++ No code changes detected
Details
LGTM analysis: JavaScript No code changes detected
Details
LGTM analysis: Python No new or fixed alerts
Details
ci/circleci: deploy Your tests passed on CircleCI!
Details
ci/circleci: doc Your tests passed on CircleCI!
Details
ci/circleci: doc artifact Link to 0/doc/_changed.html
Details
ci/circleci: doc-min-dependencies Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
codecov/patch 100% of diff hit (target 96.92%)
Details
codecov/project 96.92% (+<.01%) compared to 14f5302
Details
scikit-learn.scikit-learn Build #20190906.12 succeeded
Details
scikit-learn.scikit-learn (Linux py35_conda_openblas) Linux py35_conda_openblas succeeded
Details
scikit-learn.scikit-learn (Linux py35_ubuntu_atlas) Linux py35_ubuntu_atlas succeeded
Details
scikit-learn.scikit-learn (Linux pylatest_conda_mkl_pandas) Linux pylatest_conda_mkl_pandas succeeded
Details
scikit-learn.scikit-learn (Linux32 py35_ubuntu_atlas_32bit) Linux32 py35_ubuntu_atlas_32bit succeeded
Details
scikit-learn.scikit-learn (Windows py35_pip_openblas_32bit) Windows py35_pip_openblas_32bit succeeded
Details
scikit-learn.scikit-learn (Windows py37_conda_mkl) Windows py37_conda_mkl succeeded
Details
scikit-learn.scikit-learn (macOS pylatest_conda_mkl) macOS pylatest_conda_mkl succeeded
Details
@antoinedemathelin

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Member

jnothman commented Sep 14, 2019

@antoinedemathelin

This comment has been minimized.

Copy link

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
Projects
None yet
4 participants
You can’t perform that action at this time.