ott.geometry.distrib_costs.UnivariateWasserstein

ott.geometry.distrib_costs.UnivariateWasserstein#

class ott.geometry.distrib_costs.UnivariateWasserstein(solve_fn, ground_cost=None)[source]#

1D Wasserstein cost for two 1D distributions.

This ground cost between considers vectors as a family of values. The Wasserstein distance between them is the 1D OT cost, using a user-defined ground cost.

Parameters:

Methods

all_pairs(x, y)

Compute matrix of all pairwise costs, including the norms.

barycenter(weights, xs)

Barycentric operator.

twist_operator(vec, dual_vec, variable)

Twist inverse operator of the cost function.