paste3.helper.high_umi_gene_distance
- paste3.helper.high_umi_gene_distance(a_exp_dissim, b_exp_dissim, n)[source]
Computes the Kullback-Leibler (KL) divergence between two distribution using genes with highest UMI counts.
- Parameters:
a_exp_dissim (torch.Tensor) -- A tensor representing the first probability distribution.
b_exp_dissim (torch.Tensor) -- A tensor representing the second probability distribution.
n (int) -- Number of genes with the highest UMI counts to select for computing the KL divergence.
- Returns:
KL divergence matrix between two distributions.
- Return type:
torch.Tensor