LogAffinity

class torchdr.LogAffinity(metric: str = 'sqeuclidean', zero_diag: bool = True, device: str = 'auto', keops: bool = False, verbose: bool = False)[source]

Bases: Affinity

Base class for affinity matrices in log domain.

Parameters:
  • metric (str, optional) – The distance metric to use for computing pairwise distances.

  • device (str, optional) – The device to use for computation. Typically “cuda” for GPU or “cpu” for CPU. If “auto”, uses the device of the input data.

  • keops (bool, optional) – Whether to use KeOps for efficient computation of large-scale kernel operations.

  • verbose (bool, optional) – If True, prints additional information during computation. Default is False.

Examples using LogAffinity:

Entropic Affinities can adapt to varying noise levels

Entropic Affinities can adapt to varying noise levels

Neighbor Embedding on genomics & equivalent affinity matcher formulation

Neighbor Embedding on genomics & equivalent affinity matcher formulation