uniport.metrics.silhouette
- uniport.metrics.silhouette(X, cell_type, metric='euclidean', scale=True)[source]
- Wrapper for sklearn silhouette function values range from [-1, 1] with
1 being an ideal fit 0 indicating overlapping clusters and -1 indicating misclassified cells
By default, the score is scaled between 0 and 1. This is controlled scale=True
- Parameters:
group_key – key in adata.obs of cell labels
embed – embedding key in adata.obsm, default: ‘X_pca’
scale – default True, scale between 0 (worst) and 1 (best)