mantispy.metrics.silhouette_batch#
- mantispy.metrics.silhouette_batch(adata, label_key, batch_key, use_rep='X_pca')[source]#
How well mixed the batches are within each biological label.
Computed per label as
1 - mean|silhouette over batch|and averaged over labels. Higher is better; a silhouette near zero means the batches are indistinguishable within that label.A label is skipped when mixing is undefined for it, which is when it has fewer than two batches or as many batches as rows (one well per plate on three plates, for example). The value is NaN when every label is skipped.
- Return type: