Skip to content

MAINT Add parameter validation to RFE and RFECV.#24137

Merged
thomasjpfan merged 4 commits intoscikit-learn:mainfrom
stefmolin:maint/rfe-validate-params
Aug 29, 2022
Merged

MAINT Add parameter validation to RFE and RFECV.#24137
thomasjpfan merged 4 commits intoscikit-learn:mainfrom
stefmolin:maint/rfe-validate-params

Conversation

@stefmolin
Copy link
Copy Markdown
Contributor

Reference Issues/PRs

Towards #23462

What does this implement/fix? Explain your changes.

Add parameter validation to RFE and RFECV.

Any other comments?

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

Otherwise LGTM

Copy link
Copy Markdown
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

Thank you for the PR!

Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Comment on lines +631 to +632
_parameter_constraints = {
**RFE._parameter_constraints, # type: ignore
Copy link
Copy Markdown
Member

@thomasjpfan thomasjpfan Aug 29, 2022

Choose a reason for hiding this comment

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

For me, mypy passes without the # type: ignore comment. Do you see a mypy error without the 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'll merge this first, because using # type: ignore is consistent with what other estimators are doing.

I opened #24301 to address this typing issue everywhere.

@thomasjpfan thomasjpfan merged commit c9d4e1f into scikit-learn:main Aug 29, 2022
@stefmolin stefmolin deleted the maint/rfe-validate-params branch August 29, 2022 23:52
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Sep 12, 2022
Co-authored-by: Thomas J. Fan <thomasjpfan@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.

5 participants