Cuml: [FEA] Silhouette score - expose C++ layer to python

Created on 31 May 2019  路  10Comments  路  Source: rapidsai/cuml

Is your feature request related to a problem? Please describe.

Users currently need to go back to the host to use pre-existing functions for evaluating clusters quality without ground truth labels. A user who wanted to calculate the silhouette score did the following:

...
clustering_cuml=DBSCAN(eps=eps_test, min_samples=5)
clust_test =clustering_cuml.fit(subset) # the cudf.DataFrame
n_clusters = max(clust_test.labels_) + 1            
clust_test_labels=clust_test.labels_.to_array()
subset_pd = subset.to_pandas()
test_result = silhouette_score(subset_pd, clust_test_labels)
... 

As she was running this multiple times and storing the results, the issue compounded. Ideally, that transfer doesn't need to happen and she can use a device based silhouette score method by importing cuml.metrics.silhouette_score.

0 - Blocked 1 - On Deck CUDA / C++ New Prim feature request good first issue

All 10 comments

Thank you for bringing this to our attention.

We have an intern currently working to building out our metrics API in CUDA. The silhouette score is one of the metrics on his list.

馃憤 thanks @cjnolet

@rnyak , for you to be able to track progress

@venkywonka @teju85

@cjnolet @beckernick JFYI

@venkywonka has taken this up as his next task to implement this particular metric. Once he has a PR will update this thread notifying of the same.

Covered in #697

And #796

608

@JohnZed it looks like the Silhouette score primitive has been completed but we still need #796.

Thanks! I'll schedule #796 for 0.16 as a "good first issue"

Blocked by #2918

Was this page helpful?
0 / 5 - 0 ratings