Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@thomasjpfan
Copy link
Member

Reference Issues/PRs

Fixes #24274

What does this implement/fix? Explain your changes.

This PR checks considers negative categorical input as unknown during predict.

Any other comments?

The alternative is to error, but I think the check is simple enough to support.

Copy link
Contributor

@Micky774 Micky774 left a comment

Choose a reason for hiding this comment

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

Minor suggestion for wording, otherwise looks good.

Regarding the test, would it be worthwhile to test against multiple unique negative values? I'm fine with it as it is now, but it wouldn't hurt.

Copy link
Contributor

@Micky774 Micky774 left a comment

Choose a reason for hiding this comment

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

Assuming CI failure is a fluke, LGTM

@betatim
Copy link
Member

betatim commented Sep 20, 2022

Looks good to me. Especially if you implement the open suggestion from Meekail ;)

Copy link
Member

@lorentzenchr lorentzenchr left a comment

Choose a reason for hiding this comment

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

LGTM. Could you extend the docstrings of the estimator classes to document this behaviour?

@lorentzenchr
Copy link
Member

@Micky774 Do you want to give it a second look and an approval? In that case I'll merge.

Copy link
Contributor

@Micky774 Micky774 left a comment

Choose a reason for hiding this comment

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

LGTM (x2)!

@lorentzenchr lorentzenchr merged commit 072b481 into scikit-learn:main Sep 30, 2022
thomasjpfan added a commit to thomasjpfan/scikit-learn that referenced this pull request Oct 9, 2022
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Oct 31, 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.

Histogram GBDT can segfault if categorical contains negative categories

4 participants