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

Bug in silhouette score calculation #134

Open
dhananjay-srivastava opened this issue Mar 20, 2023 · 0 comments
Open

Bug in silhouette score calculation #134

dhananjay-srivastava opened this issue Mar 20, 2023 · 0 comments

Comments

@dhananjay-srivastava
Copy link

silhoutte score calculation does nt work, there is a bug in the code, it should be labels not label

epi.tl.silhouette(adata,'louvain')


TypeError Traceback (most recent call last)
in
----> 1 epi.tl.silhouette(adata,'louvain')

/usr/local/lib/python3.9/dist-packages/episcanpy/tools/_silhouette.py in silhouette(adata_name, cluster_annot, value, metric, key_added, copy)
46
47 ## also, return sample_silhouette_values as adata.obs['silhouette_samples']
---> 48 silhouette_avg = silhouette_score(X=X, label=cluster_labels, metric=metric)
49 sample_silhouette_values = silhouette_samples(X=X, label=cluster_labels, metric=metric)
50

TypeError: silhouette_score() missing 1 required positional argument: 'labels'

It should be labels not label in silhouette_score and silhouette_samples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant