ott.solvers.linear.univariate.quantile_solver

ott.solvers.linear.univariate.quantile_solver#

ott.solvers.linear.univariate.quantile_solver(prob, return_transport=False)[source]#

Univariate solver between quantile functions of distributions.

Parameters:
  • prob (LinearProblem) – Problem with two point clouds of shapes [n, d] and [m, d] and a ground cost. The [n,] and [m,] sized probability weights vectors are stored in attributes a and b.

  • return_transport (bool) – Whether to also return the mapped pairs used to compute the transport_matrices.

Return type:

UnivariateOutput

Returns:

The univariate output. Note that the mass_paired_indices can be \(0\) in some entries, but always sums to \(1\) for each of the \(d\) slices.

Notes

This function was inspired by wasserstein_distance(), but can be used with other costs, not just \(c(x, y) = |x - y|\).