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

Skip to content

FIX KNeighbor classes correctly set positive_only tag #30372

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

Merged
merged 8 commits into from
Dec 4, 2024

Conversation

adrinjalali
Copy link
Member

Detected in skops tests, since we were not properly generating input data.

cc @TamaraAtanasoska @jeremiedbb @glemaitre

@adrinjalali adrinjalali added the To backport PR merged in master that need a backport to a release branch defined based on the milestone. label Nov 29, 2024
@adrinjalali adrinjalali added this to the 1.6 milestone Nov 29, 2024
Copy link

github-actions bot commented Nov 29, 2024

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: f196162. Link to the linter CI: here

@adrinjalali
Copy link
Member Author

Although it begs the question, do we always want to set positive_only when pairwise=True? Or should devs who inspect tags, ignore positive_only and assume it to be true when pairwise=True?

@TamaraAtanasoska
Copy link
Contributor

Although it begs the question, do we always want to set positive_only when pairwise=True? Or should devs who inspect tags, ignore positive_only and assume it to be true when pairwise=True?

I'd be in favour of the proposed change as it is less overhead for users and it an explicit setting.

Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

LGTM. Do we need to document this fix in the changelog, no? Tags were not officially public before, but still, they are regularly used by 3rd party code as skops demonstrates.

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.

It makes sense to me to make the behavior consistent with the pairwise tag, i.e. defining it right away. LGTM

@adrinjalali
Copy link
Member Author

Ok, then let me add docs and tests and fix the other instances in the same PR

@adrinjalali
Copy link
Member Author

Ready for merge I think.

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, just a question before we merge

@jeremiedbb jeremiedbb merged commit c9fa7d4 into scikit-learn:main Dec 4, 2024
30 checks passed
jeremiedbb added a commit to jeremiedbb/scikit-learn that referenced this pull request Dec 4, 2024
@adrinjalali adrinjalali deleted the neigh/positive branch December 4, 2024 14:08
jeremiedbb added a commit that referenced this pull request Dec 6, 2024
virchan pushed a commit to virchan/scikit-learn that referenced this pull request Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:neighbors No Changelog Needed To backport PR merged in master that need a backport to a release branch defined based on the milestone.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants