scButterfly.calculate_cluster.calculate_cluster_index¶
- scButterfly.calculate_cluster.calculate_cluster_index(adata)¶
Evaluation of cluster index of prediction. Cluster method using Leiden with a default resolution. 4 different metrics provided: ARI - Adjusted Rand Index, NMI - Normalized Mutual Information, AMI - Adjusted Mutual Information, HOM - Homogeneity
- Parameters:
adata (Anndata) – Anndata need to cumpute index, there need ground truth labels “cell_type” in adata.obs.
- Returns:
ARI (float) – Adjusted Rand Index.
AMI (float) – Normalized Mutual Information.
NMI (float) – Adjusted Mutual Information.
HOM (float) – Homogeneity.