ott.core.linear_problems.LinearProblem#

class ott.core.linear_problems.LinearProblem(geom, a=None, b=None, tau_a=1.0, tau_b=1.0)[source]#

Definition of a linear regularized OT problem.

min_P<C, P> - eps H(P), s.t P.1 = a, Pt.1 = b.

Parameters
  • geom (Geometry) – the geometry.Geometry object defining the ground geometry / cost of the linear problem.

  • a (Optional[ndarray]) – jnp.ndarray[n] representing the first marginal. If None, it will be uniform.

  • b (Optional[ndarray]) – jnp.ndarray[n] representing the first marginal. If None, it will be uniform.

  • tau_a (float) – if lower that 1.0, defines how much unbalanced the problem is on the first marginal.

  • tau_b (float) – if lower that 1.0, defines how much unbalanced the problem is on the second marginal.

Methods

get_transport_functions(lse_mode)

Instantiate useful functions for Sinkhorn depending on lse_mode.

Attributes

a

rtype

ndarray

b

rtype

ndarray

epsilon

rtype

float

is_balanced

rtype

bool