ott.geometry.low_rank.LRKGeometry.from_pointcloud

ott.geometry.low_rank.LRKGeometry.from_pointcloud#

classmethod LRKGeometry.from_pointcloud(x, y, *, kernel, rank=100, std=1.0, n=1, rng=None)[source]#

Low-rank kernel approximation [Scetbon and Cuturi, 2020].

Parameters:
  • x (Array) – Array of shape [n, d].

  • y (Array) – Array of shape [m, d].

  • kernel (Literal['gaussian', 'arccos']) – Type of the kernel to approximate.

  • rank (int) – Rank of the approximation.

  • std (float) –

    Depending on the kernel approximation:

    • 'gaussian' - scale of the Gibbs kernel.

    • 'arccos' - standard deviation of the random projections.

  • n (int) – Order of the arc-cosine kernel, see [Cho and Saul, 2009] for reference.

  • rng (Optional[Array]) – Random key used for seeding.

Return type:

LRKGeometry

Returns:

Low-rank kernel geometry.