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 twopoint cloudsof shapes[n, d]and[m, d]and a ground cost. The[n,]and[m,]sized probability weights vectors are stored in attributesaandb.return_transport (
bool) – Whether to also return the mapped pairs used to compute thetransport_matrices.
- Return type:
- Returns:
The univariate output. Note that the
mass_paired_indicescan 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|\).