mantispy.metrics.evaluate_correction#
- mantispy.metrics.evaluate_correction(adata, reps=('X_pca',), label_key='Metadata_Perturbation', batch_key='Metadata_Batch', map_key=None)[source]#
Run every metric for every representation and stack the results.
- Parameters:
adata (
AnnData) – Object holding the representations inobsm.reps (
Sequence[str] (default:('X_pca',))) – Representations to compare, e.g.("X_pca", "X_pca_harmony").label_key (
str(default:'Metadata_Perturbation')) –obscolumn with the biological grouping.batch_key (
str(default:'Metadata_Batch')) –obscolumn with the nuisance grouping.map_key (
str|None(default:None)) – Name of a table written bymap(), to add its mean mAP as one more row per representation.
- Return type:
- Returns:
A tidy frame with
metric,representation,key,valueandbetter, the last saying which direction is an improvement for that metric.