viabel.wasserstein_bounds

viabel.wasserstein_bounds(d2, *, samples=None, moment_bound_fn=None)[source]

Compute all bounds.

Compute 1- and 2-Wasserstein distance bounds between distribution p and q using a bound on the 2-divergence and moment bounds.

Parameters:
d2float

(Bound on) the 2-divergence between p and q.

samplesarray-like matrix, shape (n_samples, n_dimensions)

samples from q.

moment_bound_fnarray-like matrix, shape (n_variant_types, n_signatures)

moment_bound_fn(a) should return a bound on \(\min_y \mathbb E[(x_i - y)^p]\). It must be provided if samples is None. Must support a = 2 and a = 4.

Returns:
resultsdict

contains the following bounds: W1, W2.