ott.initializers.linear.initializers_lr.KMeansInitializer#

class ott.initializers.linear.initializers_lr.KMeansInitializer(rank, min_iterations=100, max_iterations=100, sinkhorn_kwargs=None, **kwargs)[source]#

K-means initializer for low-rank Sinkhorn [Scetbon and Cuturi, 2022].

Applicable for PointCloud and LRCGeometry.

Parameters
  • rank (int) – Rank of the factorization.

  • min_iterations (int) – Minimum number of k-means iterations.

  • max_iterations (int) – Maximum number of k-means iterations.

  • sinkhorn_kwargs (Optional[Mapping[str, Any]]) – Keyword arguments for Sinkhorn.

  • kwargs (Any) – Keyword arguments for k_means().

Methods

from_solver(solver, *, kind, **kwargs)

Create a low-rank initializer from a linear or quadratic solver.

init_g(ot_prob, key, **kwargs)

Initialize the low-rank factor \(g\).

init_q(ot_prob, key, *, init_g, **kwargs)

Initialize the low-rank factor \(Q\).

init_r(ot_prob, key, *, init_g, **kwargs)

Initialize the low-rank factor \(R\).

Attributes

rank

Rank of the transport matrix factorization.