ott.initializers.linear.initializers_lr.KMeansInitializer.init_r#

KMeansInitializer.init_r(ot_prob, key, *, init_g, **kwargs)[source]#

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

Parameters
  • ot_prob (Union[LinearProblem, QuadraticProblem]) – Linear OT problem.

  • key (Array) – Random key for seeding.

  • init_g (Array) – Initial value for \(g\) factor.

  • kwargs (Any) – Additional keyword arguments.

Return type

Array

Returns

Array of shape [m, rank].