cycombinepy.compute_mad

cycombinepy.compute_mad(adata, cell_key='cycombine_som', batch_key='batch', markers=None, layer=None)[source]

Per (cluster, marker, batch) Median Absolute Deviation.

Returns a tidy DataFrame with columns cluster, marker, batch, mad. Mirrors compute_mad in R/evaluate_performance.R: MAD is the median of |x - median(x)| within each (cluster, batch) block.

Return type:

DataFrame

Parameters: