Metrics

Metrics#

Metrics do not modify the object. Each returns a tidy frame with metric, representation, key and value, so results from several calls stack.

metrics.silhouette_label(adata, label_key[, ...])

How well separated the biological labels are, rescaled to [0, 1].

metrics.silhouette_batch(adata, label_key, ...)

How well mixed the batches are within each biological label.

metrics.lisi(adata, key[, use_rep, ...])

Median LISI over rows [Korsunsky et al., 2019].

metrics.pc_regression(adata, key[, use_rep, ...])

Variance-weighted R^2 of the principal components on key.

metrics.batch_variance_explained(adata, keys)

pc_regression() for several covariates, stacked into one frame.

metrics.known_relationships(adata, net[, ...])

Share of annotated pairs that land in either tail of the similarity distribution [Celik et al., 2024].

metrics.evaluate_correction(adata, *[, ...])

Run every metric for every representation and stack the results.

metrics.diagnose_testing(adata[, groupby, ...])

Check whether differential testing is calibrated on this screen.