Skip to content

MAINT Use _validate_params in Power and Quantile Transformer #23672

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

Conversation

Gandagorn
Copy link
Contributor

Reference Issues/PRs

towards #23462

What does this implement/fix? Explain your changes.

  • Defines _parameter_contraints in PowerTransformer and QuantileTransformer.
  • Adds self._validate_params in fit functions.
  • Removes redundant parameter tests.

Any other comments?

The test test_quantile_transform_check_error() fails because it also checks the parameters during transform and inverse_transform. I am unsure whether I should remove this test or also call self._validate_params in transform and inverse_transform.

@jeremiedbb jeremiedbb added No Changelog Needed Validation related to input validation labels Jun 21, 2022
@Gandagorn Gandagorn changed the title [WIP] MNT Use _validate_params in Power and Quantile Transformer [MRG] MNT Use _validate_params in Power and Quantile Transformer Jun 22, 2022
@glemaitre glemaitre self-requested a review June 27, 2022 10:16
@glemaitre glemaitre changed the title [MRG] MNT Use _validate_params in Power and Quantile Transformer MAINT Use _validate_params in Power and Quantile Transformer Jun 27, 2022
Copy link
Member

@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

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

I removed the tests checking the parameter at transform. If we enforce this checking, it should be done for all estimators.

Otherwise the rest is LGTM.

@jeremiedbb
Copy link
Member

I removed the tests checking the parameter at transform. If we enforce this checking, it should be done for all estimators.

I'm ok with that

Copy link
Member

@jeremiedbb jeremiedbb left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @Gandagorn

@jeremiedbb jeremiedbb merged commit a63a827 into scikit-learn:main Jun 28, 2022
ogrisel pushed a commit to ogrisel/scikit-learn that referenced this pull request Jul 11, 2022
…learn#23672)

Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants