scib_metrics.nmi_ari_cluster_labels_kmeans

scib_metrics.nmi_ari_cluster_labels_kmeans#

scib_metrics.nmi_ari_cluster_labels_kmeans(X, labels)[source]#

Compute nmi and ari between k-means clusters and labels.

This deviates from the original implementation in scib by using k-means with k equal to the known number of cell types/labels. This leads to a more efficient computation of the nmi and ari scores.

Parameters:
  • X (ndarray) – Array of shape (n_cells, n_features).

  • labels (ndarray) – Array of shape (n_cells,) representing label values

Return type:

dict[str, float]

Returns:

nmi

Normalized mutual information score

ari

Adjusted rand index score