Skip to content

DOC clarify cluster metric label inputs - #33912

Merged
jeremiedbb merged 1 commit into
scikit-learn:mainfrom
Shy4n7:doc-cluster-label-dtype
May 4, 2026
Merged

jeremiedbb merged 1 commit into
scikit-learn:mainfrom
Shy4n7:doc-cluster-label-dtype

Conversation

@Shy4n7

@Shy4n7 Shy4n7 commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Reference Issues/PRs

Fixes #32930.

What does this implement/fix? Explain your changes.

This updates the parameter documentation for adjusted_mutual_info_score and normalized_mutual_info_score so labels_true and labels_pred are documented as array like inputs instead of integer only inputs.

This matches the current implementation, which accepts arbitrary discrete labels, and aligns these docstrings with the rest of the supervised clustering metrics documentation.

Any other comments?

The existing clustering metric common tests already cover string label inputs through test_format_invariance.

@Shy4n7

Shy4n7 commented Apr 30, 2026

Copy link
Copy Markdown
Contributor Author

I opened a small PR to address this by updating the adjusted_mutual_info_score and normalized_mutual_info_score parameter docs from integer only labels to array like labels.

The change matches the existing implementation behavior and the current common clustering metric tests that cover string label inputs.

@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

@jeremiedbb
jeremiedbb merged commit 7a76694 into scikit-learn:main May 4, 2026
36 checks passed
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.

DOC Supervised clustering metrics specify array input dtype

2 participants