Skip to contents

Row i of the plan divided by its mass a_i, i.e. the conditional distribution of the destination given the source. Cuturi (2013), eq. (2) for the plan; Peyre & Cuturi (2019), Remark 4.11.

Usage

Otsoftas(a, b, C, epsilon, max_iter = 200L)

Arguments

a, b

Non-negative marginals; closed here.

C

Cost matrix.

epsilon

Positive regularisation strength.

max_iter

Fixed number of scalings (default 200).

Value

Named list with estimate (row-normalised matrix), T, entropy_mean, hard, method.

References

Cuturi (2013), eq. (2).

Examples

Otsoftas(a = c(1, 2, 3, 4, 5, 6, 7, 8), b = 5L, C = c(1, 2, 3, 4, 5, 6, 7, 8), epsilon = 5L)
#> $estimate
#>      [,1]
#> [1,]    1
#> [2,]    1
#> [3,]    1
#> [4,]    1
#> [5,]    1
#> [6,]    1
#> [7,]    1
#> [8,]    1
#> 
#> $T
#>            [,1]
#> [1,] 0.02777778
#> [2,] 0.05555556
#> [3,] 0.08333333
#> [4,] 0.11111111
#> [5,] 0.13888889
#> [6,] 0.16666667
#> [7,] 0.19444444
#> [8,] 0.22222222
#> 
#> $entropy_mean
#> [1] 0
#> 
#> $hard
#> [1] 0 0 0 0 0 0 0 0
#> 
#> $method
#> [1] "Row-normalised entropic plan (soft assignment) -- Cuturi (2013) eq. (2)"
#>