ott.problems.quadratic.quadratic_problem.QuadraticProblem.update_linearization#
- QuadraticProblem.update_linearization(transport, epsilon=None, old_transport_mass=1.0, remove_scale=False)[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 (
Union
[float
,Epsilon
,None
]) – 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.remove_scale (
bool
) – Whether to remove any scaling from the cost matrices when computing the linearization of the quadratic cost. At the moment, this is only used when doing this update at the last outer iteration of theGromovWasserstein
solver.
- Return type:
- Returns:
Updated linear OT problem, a new local linearization of GW problem.