UMAPAffinityOut

class torchdr.UMAPAffinityOut(min_dist: float = 0.1, spread: float = 1, a: float | None = None, b: float | None = None, metric: str = 'sqeuclidean', zero_diag: bool = True, device: str = 'auto', keops: bool = False, verbose: bool = False)[source]

Bases: UnnormalizedAffinity

Compute the affinity used in embedding space in UMAP [8].

Its \((i,j)\) coefficient is as follows:

\[1 / \left(1 + a C_{ij}^{b} \right)\]

where parameters a and b are fitted to the spread and min_dist parameters.

Parameters:
  • min_dist (float, optional) – min_dist parameter from UMAP. Provides the minimum distance apart that points are allowed to be.

  • spread (float, optional) – spread parameter from UMAP.

  • a (float, optional) – factor of the cost matrix.

  • b (float, optional) – exponent of the cost matrix.

  • degrees_of_freedom (int, optional) – Degrees of freedom for the Student-t distribution.

  • metric (str, optional) – Metric to use for pairwise distances computation.

  • zero_diag (bool, optional) – Whether to set the diagonal of the affinity matrix to zero.

  • device (str, optional) – Device to use for computations.

  • keops (bool, optional) – Whether to use KeOps for computations.

  • verbose (bool, optional) – Verbosity. Default is False.

References