Skip to content
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

Update cluster metrics to handle edge cases. #28528

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

fkdosilovic
Copy link
Contributor

@fkdosilovic fkdosilovic commented Feb 25, 2024

Reference Issues/PRs

Closes #15717. Supersedes #15815.

What does this implement/fix? Explain your changes.

Modify silhouette_samples, silhouette_score, calinski_harabasz_score, and davies_bouldin_score to be compatible with GridSearchCV() when the numbers of clusters is equal to 1 or equal to n_samples.

Any other comments?

None.

cc @jnothman

Copy link

github-actions bot commented Feb 25, 2024

✔️ Linting Passed

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

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

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.

Silhouette score is not defined when the estimator return only 1 cluster
1 participant