cycombinepy.compute_emd

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

Per (cluster, marker, batch-pair) 1-D Earth Mover’s distance.

Returns a tidy DataFrame with columns cluster, marker, batch1, batch2, emd. Uses scipy.stats.wasserstein_distance(), which is equivalent to the 1-D EMD that cyCombine computes via emdist::emd2d on single-column matrices.

Return type:

DataFrame

Parameters: