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

Silhouette Score make_monotonic for non-monotonic label set #3619

Merged
merged 4 commits into from
Mar 16, 2021

Conversation

divyegala
Copy link
Member

closes #3584

@divyegala divyegala requested a review from a team as a code owner March 15, 2021 20:43
@divyegala divyegala added bug Something isn't working Cython / Python Cython or Python issue non-breaking Non-breaking change labels Mar 15, 2021
Copy link
Member

@dantegd dantegd left a comment

Choose a reason for hiding this comment

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

Code looks good, just one request

@@ -105,6 +106,16 @@ def _silhouette_coeff(
labels.to_output(output_type='cupy', output_dtype='int')
).shape[0]

if not check_labels(labels, cp.arange(n_labels, dtype=np.int32)):
Copy link
Member

Choose a reason for hiding this comment

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

I think adding a test case that exercises this would be a good idea unless there is one already? Didn't see it on a quick look

Copy link
Member Author

Choose a reason for hiding this comment

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

Any suggestions on how to test this without hard-coding some examples?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hard-coding is great! Allows you to exactly control the case. Much nicer than just using some big dataset that's hard to debug.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks! I'll just add the examples in the issue

@dantegd dantegd added the 4 - Waiting on Author Waiting for author to respond to review label Mar 16, 2021
@dantegd dantegd added this to PR-WIP in v0.19 Release via automation Mar 16, 2021
@divyegala divyegala added 4 - Waiting on Reviewer Waiting for reviewer to review or respond and removed 4 - Waiting on Author Waiting for author to respond to review labels Mar 16, 2021
v0.19 Release automation moved this from PR-WIP to PR-Reviewer approved Mar 16, 2021
Copy link
Member

@dantegd dantegd left a comment

Choose a reason for hiding this comment

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

lgtm

@dantegd
Copy link
Member

dantegd commented Mar 16, 2021

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 96eaf62 into rapidsai:branch-0.19 Mar 16, 2021
v0.19 Release automation moved this from PR-Reviewer approved to Done Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - Waiting on Reviewer Waiting for reviewer to review or respond bug Something isn't working Cython / Python Cython or Python issue non-breaking Non-breaking change
Projects
No open projects
v0.19 Release
  
Done
Development

Successfully merging this pull request may close these issues.

[BUG] Silhouette Score Error
3 participants