moscot.problems.generic.SinkhornProblem.compute_entropy¶
- SinkhornProblem.compute_entropy(source, target, forward=True, key_added='conditional_entropy', batch_size=None, c=1e-10, **kwargs)¶
Compute the conditional entropy per cell.
The conditional entropy reflects the uncertainty of the mapping of a single cell.
- Parameters:
forward (
bool) – If True, computes the conditional entropy of a cell in the source distribution, else the conditional entropy of a cell in the target distribution.key_added (
Optional[str]) – Key inobswhere the entropy is stored.batch_size (
Optional[int]) – Batch size for the computation of the entropy. IfNone, the entire dataset is used.c (
float) – Constant added to each row of the transport matrix to avoid numerical instability.**kwargs (
Any) – The description is missing.
- Return type:
- Returns:
:
Noneifkey_addedis not None. Otherwise, returns a data frame of shape(n_cells, 1)containing the conditional entropy per cell.