paste3.helper.dissimilarity_metric
- paste3.helper.dissimilarity_metric(which, a_slice, b_slice, a_exp_dissim, b_exp_dissim, **kwargs)[source]
Computes a dissimilarity matrix between two distribution using a specified metric.
- Parameters:
which (str) -- The dissimilarity metric to use. Options are: - "euc" or "euclidean" for Euclidean distance. - "gkl" for generalized KL divergence. - "kl" for KL divergence. - "selection_kl" for KL divergence with top 2000 high-UMI genes. - "pca" for PCA-based distance. - "glmpca" for GLM-PCA-based distance.
a_slice (AnnData) -- AnnData object containing data for the first slice.
b_slice (AnnData) -- AnnData object containing data for the second slice.
a_exp_dissim (torch.Tensor) -- A tensor representing the first probability distribution.
b_exp_dissim (torch.Tensor) -- A tensor representing the second probability distribution.
- Returns:
A tensor representing pairwise dissimilarities between two distributions according to the specified metric.
- Return type:
torch.Tensor