ott.problems.linear.linear_problem.LinearProblem#

class ott.problems.linear.linear_problem.LinearProblem(geom, a=None, b=None, tau_a=1.0, tau_b=1.0)[source]#

Linear OT problem.

This class describes the main ingredients appearing in a linear OT problem. Namely, a geom object (including cost structure/points) describing point clouds or the support of measures, followed by probability masses a and b. Unbalancedness of the problem is also kept track of, through two coefficients tau_a and tau_b, which are both kept between 0 and 1 (1 corresponding to a balanced OT problem).

Parameters
  • geom (Geometry) – The ground geometry cost of the linear problem.

  • a (Optional[Array]) – The first marginal. If None, it will be uniform.

  • b (Optional[Array]) – The second marginal. If None, it will be uniform.

  • tau_a (float) – If < 1, defines how much unbalanced the problem is on the first marginal.

  • tau_b (float) – If < 1, 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

First marginal.

b

Second marginal.

epsilon

Entropic regularization.

is_balanced

Whether the problem is balanced.