moscot.problems.time.TemporalProblem.compute_batch_distances#

TemporalProblem.compute_batch_distances(time, batch_key, posterior_marginals=True, backend='ott', **kwargs)#

Compute the average Wasserstein distance between batches for a specific time point.

See also

  • TODO(MUCDK): create an example showing the usage.

Parameters:
  • time (TypeVar(K, bound= Hashable)) – Time point for which to compute the distances.

  • batch_key (str) – Key in obs where batches are stored.

  • posterior_marginals (bool) – Whether to use posterior_growth_rates or prior_growth_rates. TODO(MUCDK): needs more explanation

  • backend (Literal['ott']) – Backend used for the distance computation.

  • kwargs (Any) –

    Keyword arguments for the distance function, depending on the backend:

  • self (TemporalMixinProtocol[K, B]) –

Return type:

float

Returns:

: The average distance between batches for a specific time point.