ott.geometry.pointcloud.PointCloud.to_LRCGeometry

ott.geometry.pointcloud.PointCloud.to_LRCGeometry#

PointCloud.to_LRCGeometry(rank=0, tol=0.01, rng=None, scale=1.0)[source]#

Convert point cloud to low-rank geometry.

The squared Euclidean and the negative dot-product costs are factorized exactly, ignoring rank, tol and rng. Other costs are factorized using to_LRCGeometry().

Parameters:
  • rank (int) – Target rank of the cost_matrix.

  • tol (float) – Tolerance of the error.

  • rng (Optional[Array]) – The PRNG key used for the factorization.

  • scale (float) – Value used to rescale the factors of the low-rank geometry. Useful when this geometry is used in the linear term of fused GW.

Return type:

LRCGeometry

Returns:

Low-rank geometry.