Skip to contents

Barycentres, Wasserstein-Bures interpolation and incompressible fluid paths are all the same object seen from different angles: a single coupling of S measures, not a chain of pairwise ones. Pairwise plans cannot be glued into a consistent joint law in general, so the multimarginal problem has to be solved as one problem. Entropic smoothing keeps the scalings one-dimensional, which is the only reason it is tractable at all.

Usage

Otmot(margins, C_tensor, epsilon, max_iter = 200)

Arguments

margins

List of the prescribed marginals.

C_tensor

Cost tensor, flattened row-major (last index varying fastest), of length prod_s length(margins[[s]]).

epsilon

Entropic strength, positive.

max_iter

Sweeps over the marginals.

Value

List with T, cost, mass, marg_err, dims, S, iters.

Details

Formula: min_P <C, P> - eps H(P) over tensors whose S marginals are the given histograms; solved by u_s <- u_s a_s / marg_s(P) – Peyre and Cuturi (2019) eq. (10.1)-(10.2), p. 159; Benamou et al. (2015) Section 5.

References

Benamou, J.-D., Carlier, G., Cuturi, M., Nenna, L. and Peyre, G. (2015). SIAM Journal on Scientific Computing 37(2):A1111-A1138. doi:10.1137/141000439 .

Examples

m <- list(c(0.5, 0.5), c(0.5, 0.5), c(0.5, 0.5))
C <- as.numeric(aperm(array(c(0, 1, 1, 2, 1, 2, 2, 3), c(2, 2, 2)), 3:1))   # sum of indices
r <- Otmot(m, C, epsilon = 0.1)
r$marg_err
#> [1] 0