ott.problems.linear.linear_problem.LinearProblem.potential_fn_from_dual_vec

ott.problems.linear.linear_problem.LinearProblem.potential_fn_from_dual_vec#

LinearProblem.potential_fn_from_dual_vec(fg, *, epsilon=None, axis)[source]#

Get potential function from a dual vector using the c-transform.

Parameters:
  • fg (Array) – Potential vector \(\mathbb{f}\) if axis = 0 else \(\mathbb{g}\) of shape [n,] or [m,], respectively.

  • epsilon (Optional[float]) – Epsilon regularization. If None, use in the geom.

  • axis (Literal[0, 1]) – If axis = 0, return the \(g\)-potential function, otherwise return the \(f\)-potential function.

Return type:

Callable[[Array], Array]

Returns:

The dual potential function.