# ott.problems.linear.potentials.DualPotentials#

class ott.problems.linear.potentials.DualPotentials(f, g, *, cost_fn, corr=False)[source]#

The Kantorovich dual potential functions $$f$$ and $$g$$.

$$f$$ and $$g$$ are a pair of functions, candidates for the dual OT Kantorovich problem, supposedly optimal for a given pair of measures.

Parameters

Methods

 distance(src, tgt) Evaluate 2-Wasserstein distance between samples using dual potentials. transport(vec[, forward]) Transport vec according to Brenier formula .

Attributes

 f The first dual potential function. g The second dual potential function.