Skip to content

MAINT Parameters validation for sklearn.metrics.pairwise.pairwise_distances_argmin_min #26123

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

pooja-subramaniam
Copy link
Contributor

Reference Issues/PRs

towards #24862

What does this implement/fix? Explain your changes.

added automatic validation of sklearn.metrics.pairwise.pairwise_distances_argmin_min

Copy link

@aizardar aizardar left a comment

Choose a reason for hiding this comment

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

validate_params decorator looks good (first file). The function to the list of the common param validation test is also correctly added (second file). Check Changelog can be skipped as it was also skipped for other functions.

@jeremiedbb jeremiedbb added No Changelog Needed Validation related to input validation labels Apr 12, 2023
"X": ["array-like", "sparse matrix"],
"Y": ["array-like", "sparse matrix"],
"axis": [Options(Integral, {0, 1})],
"metric": [str, callable],
Copy link
Member

Choose a reason for hiding this comment

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

Similarly to #26124, we will need to specify the set of correct strings. I have to check around to see which list should use there.

@github-actions
Copy link

✔️ Linting Passed

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

Generated for commit: 976c51d. Link to the linter CI: here

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.

Fixed the metric constraint. LGTM. Thanks @pooja-subramaniam

@jeremiedbb jeremiedbb enabled auto-merge (squash) June 27, 2023 15:01
@jeremiedbb jeremiedbb merged commit 4be1089 into scikit-learn:main Jun 27, 2023
punndcoder28 pushed a commit to punndcoder28/scikit-learn that referenced this pull request Jul 29, 2023
…tances_argmin_min (scikit-learn#26123)

Co-authored-by: jeremiedbb <jeremiedbb@yahoo.fr>
REDVM pushed a commit to REDVM/scikit-learn that referenced this pull request Nov 16, 2023
…tances_argmin_min (scikit-learn#26123)

Co-authored-by: jeremiedbb <jeremiedbb@yahoo.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants