Skip to content

MAINT Use _validate_params in Power and Quantile Transformer - #23672

Merged
jeremiedbb merged 7 commits into
scikit-learn:mainfrom
Gandagorn:power_quantile_transformer_validate_params
Jun 28, 2022
Merged

jeremiedbb merged 7 commits into
scikit-learn:mainfrom
Gandagorn:power_quantile_transformer_validate_params

Conversation

@Gandagorn

Copy link
Copy Markdown
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

@glemaitre glemaitre left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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

@jeremiedbb jeremiedbb left a comment

Copy link
Copy Markdown
Member

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
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