ott.geometry.costs.PNormP.h_transform

ott.geometry.costs.PNormP.h_transform#

PNormP.h_transform(f, ridge=1e-08, **kwargs)#

Compute the h-transform of a concave function.

Return a callable \(f_h\) defined as:

\[f_h(x) = \min_y h(x - y) - f(y)\]

This is equivalent, up to a change of variables, \(z = x - y\), to define

\[\begin{split}\min_z h(z) - f(x - z). \\ \min_z h(z) + \tilde{f}(z, x).\end{split}\]

where \(\tilde{f}(z, x) := -f(x - z)\).

Parameters:
  • f (Callable[[Array], float]) – Concave function.

  • ridge (float) – Regularizer to ensure strong convexity of the objective.

  • kwargs (Any) – Keyword arguments for LBFGS.

Return type:

Callable[[Array], float]

Returns:

The h-transform of f.