ott.problems.quadratic.quadratic_problem.QuadraticProblem.update_linearization#
- QuadraticProblem.update_linearization(transport, epsilon=None, old_transport_mass=1.0, relative_epsilon=None)[source]#
Update linearization of GW problem by updating cost matrix.
If the problem is balanced (
tau_a = 1.0 and tau_b = 1.0
), the equation follows eq. 6, p. 1 of [Peyré et al., 2016].If the problem is unbalanced (
tau_a < 1.0 or tau_b < 1.0
), two cases are possible, as explained ininit_linearization()
above. Finally, it is also possible to consider a Fused Gromov-Wasserstein problem. Details about the resulting cost matrix are also given ininit_linearization()
.- Parameters:
transport (
Transport
) – Solution of the linearization of the quadratic problem.epsilon (
Optional
[float
]) – An epsilon scheduler or a float passed on to the linearization.old_transport_mass (
float
) – Sum of the elements of the transport matrix at the previous iteration.relative_epsilon (
Optional
[bool
]) – Whether to use relative epsilon in the linearized geometry.
- Return type:
- Returns:
Updated linear OT problem, a new local linearization of GW problem.