sinfonia.metrics.clustering_metrics¶
- sinfonia.metrics.clustering_metrics(adata, target, pred)¶
Evaluate clustering performance.
- Parameters
adata – AnnData object of shape n_obs × n_vars. Rows correspond to cells and columns to genes.
target – Key in adata.obs where ground-truth spatial domain labels are stored.
pred – Key in adata.obs where clustering assignments are stored.
- Returns
ami – Adjusted mutual information score.
ari – Adjusted Rand index score.
homo – Homogeneity score.
nmi – Normalized mutual information score.