deepof.post_hoc.separation_between_conditions

deepof.post_hoc.separation_between_conditions(cur_embedding: deepof_table_dict, cur_soft_counts: deepof_table_dict, cur_breaks: deepof_table_dict, exp_conditions: dict, agg: str, metric: str)

Compute the distance between the embeddings of two conditions, using the specified aggregation method.

Parameters:
  • cur_embedding (TableDict) – A dictionary of embeddings, where the keys are the names of the experimental conditions, and the values are the embeddings for each condition.

  • cur_soft_counts (TableDict) – A dictionary of soft counts, where the keys are the names of the experimental conditions, and the values are the soft counts for each condition.

  • cur_breaks (TableDict) – A dictionary of breaks, where the keys are the names of the experimental conditions, and the values are the breaks for each condition.

  • exp_conditions (dict) – A dictionary of experimental conditions, where the keys are the names of the experiments, and the values are the names of their corresponding experimental conditions.

  • agg (str) – The aggregation method to use. Can be one of “time on cluster”, “mean”, or “median”.

  • metric (str) – The distance metric to use. Can be either “auc” (where the reported ‘distance’ is based on performance of a classifier when separating aggregated embeddings), or “wasserstein” (which computes distances based on optimal transport).

Returns:

The distance between the embeddings of the two conditions.