ott.neural.methods.expectile_neural_dual.ENOTPotentials.transport

ott.neural.methods.expectile_neural_dual.ENOTPotentials.transport#

ENOTPotentials.transport(vec, forward=True)#

Transport vec according to Gangbo-McCann Brenier [Brenier, 1991].

Uses Proposition 1.15 from [Santambrogio, 2015] to compute an OT map when applying the inverse gradient of cost.

When the cost is a general cost, the operator uses the twist_operator() associated of the corresponding CostFn.

When the cost is a translation invariant TICost cost, \(c(x,y)=h(x-y)\), and the twist operator translates to the application of the convex conjugate of \(h\) to the gradient of the dual potentials, namely \(x- (\nabla h^*)\circ \nabla f(x)\) for the forward map, where \(h^*\) is the Legendre transform of \(h\). For instance, in the case \(h(\cdot) = \|\cdot\|^2, \nabla h(\cdot) = 2 \cdot\,\), one has \(h^*(\cdot) = \|.\|^2 / 4\), and therefore \(\nabla h^*(\cdot) = 0.5 \cdot\,\).

Parameters:
  • vec (Array) – Points to transport, array of shape [n, d].

  • forward (bool) – Whether to transport the points from source to the target distribution or vice-versa.

Return type:

Array

Returns:

The transported points.