ott.solvers.linear.sinkhorn.SinkhornState.recenter

ott.solvers.linear.sinkhorn.SinkhornState.recenter#

SinkhornState.recenter(f, g, ot_prob)[source]#

Re-center dual potentials.

If the ot_prob is balanced, the f potential is zero-centered. Otherwise, use prop. 2 of [Sejourne et al., 2022] re-center the potentials iff tau_a < 1 and tau_b < 1.

Parameters:
  • f (Array) – The first dual potential.

  • g (Array) – The second dual potential.

  • ot_prob (LinearProblem) – Linear OT problem.

Return type:

Tuple[Array, Array]

Returns:

The centered potentials.