You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
extract dual potentials (φ, ψ) and their derivatives using POT #728
I've been using POT to solve 2D optimal transport problems involving transforming shapes (ellipse to circle, etc.), and I’ve run into an issue I couldn’t resolve after exploring several of the available APIs.
I tried ot.sinkhorn and the convolutional barycenter. however for the first didn't return reliable values, and the second seems to only return the barycenter.
This is an example of how I could define my source and target:
def S1(x, y, r):
O = np.zeros(len(x))
for k in range(len(x)):
if x[k]**2 + y[k]2 < r2:
O[k] = 1
return O / np.sum(O)
def S2(x, y, a, b):
O = np.zeros(len(x))
for k in range(len(x)):
if (x[k]2) / a2 + (y[k]2) / b2 < 1:
O[k] = 1
return O / np.sum(O)
Activity
[-]extract dual potentials (φ, ψ) using POT[/-][+]extract dual potentials (φ, ψ) and their derivatives using POT[/+]