Skip to contents

The true W_2 between two Gaussian mixtures has no closed form and its optimal plan splits components, so the geodesic leaves the mixture family altogether. Restricting the couplings to those that move whole components onto whole components keeps everything inside the family and reduces the problem to a small discrete transport whose ground cost is the closed-form Gaussian W_2^2. The restriction can only raise the cost, so MW_2 >= W_2 always.

Usage

Otmxh(mus1, Sigmas1, w1, mus2, Sigmas2, w2)

Arguments

mus1

Component means of the first mixture, K1 by d.

Sigmas1

List of K1 component covariances.

w1

Mixture weights, rescaled to sum to one.

mus2, Sigmas2, w2

The same for the second mixture.

Value

List with MW2, MW2_sq, T, C, K1, K2, d.

Details

Formula: \(MW_2^2 = min_{w in Pi(p,q)} sum_kl w_kl W_2^2(N(m_k,S_k), N(m'_l,S'_l))\) – Delon and Desolneux (2020) Definition 4.1.

References

Delon, J. and Desolneux, A. (2020). SIAM Journal on Imaging Sciences 13(2):936-970. doi:10.1137/19M1301047 .

Examples

Otmxh(mus1 = c(1, 2, 3, 4, 5, 6, 7, 8), Sigmas1 = c(1, 2, 3, 4, 5, 6, 7, 8),
  w1 = c(1, 2, 3, 4, 5, 6, 7, 8), mus2 = c(1, 2, 3, 4, 5, 6, 7, 8),
  Sigmas2 = c(1, 2, 3, 4, 5, 6, 7, 8), w2 = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $MW2
#> [1] 1.720638e-08
#> 
#> $MW2_sq
#> [1] 2.960595e-16
#> 
#> $T
#>            [,1]       [,2]       [,3]      [,4]      [,5]      [,6]      [,7]
#> [1,] 0.02777778 0.00000000 0.00000000 0.0000000 0.0000000 0.0000000 0.0000000
#> [2,] 0.00000000 0.05555556 0.00000000 0.0000000 0.0000000 0.0000000 0.0000000
#> [3,] 0.00000000 0.00000000 0.08333333 0.0000000 0.0000000 0.0000000 0.0000000
#> [4,] 0.00000000 0.00000000 0.00000000 0.1111111 0.0000000 0.0000000 0.0000000
#> [5,] 0.00000000 0.00000000 0.00000000 0.0000000 0.1388889 0.0000000 0.0000000
#> [6,] 0.00000000 0.00000000 0.00000000 0.0000000 0.0000000 0.1666667 0.0000000
#> [7,] 0.00000000 0.00000000 0.00000000 0.0000000 0.0000000 0.0000000 0.1944444
#> [8,] 0.00000000 0.00000000 0.00000000 0.0000000 0.0000000 0.0000000 0.0000000
#>           [,8]
#> [1,] 0.0000000
#> [2,] 0.0000000
#> [3,] 0.0000000
#> [4,] 0.0000000
#> [5,] 0.0000000
#> [6,] 0.0000000
#> [7,] 0.0000000
#> [8,] 0.2222222
#> 
#> $C
#>           [,1]      [,2]      [,3]      [,4]      [,5]         [,6]      [,7]
#> [1,]  0.000000  1.171573  4.535898 10.000000 17.527864 2.710102e+01 38.708497
#> [2,]  1.171573  0.000000  1.101021  4.343146  9.675445 1.707180e+01 26.516685
#> [3,]  4.535898  1.101021  0.000000  1.071797  4.254033 9.514719e+00 16.834849
#> [4,] 10.000000  4.343146  1.071797  0.000000  1.055728 4.202041e+00  9.416995
#> [5,] 17.527864  9.675445  4.254033  1.055728  0.000000 1.045549e+00  4.167840
#> [6,] 27.101021 17.071797  9.514719  4.202041  1.045549 1.776357e-15  1.038519
#> [7,] 38.708497 26.516685 16.834849  9.416995  4.167840 1.038519e+00  0.000000
#> [8,] 52.343146 38.000000 26.202041 16.686292  9.350889 4.143594e+00  1.033370
#>           [,8]
#> [1,] 52.343146
#> [2,] 38.000000
#> [3,] 26.202041
#> [4,] 16.686292
#> [5,]  9.350889
#> [6,]  4.143594
#> [7,]  1.033370
#> [8,]  0.000000
#> 
#> $K1
#> [1] 8
#> 
#> $K2
#> [1] 8
#> 
#> $d
#> [1] 1
#> 
#> $method
#> [1] "Mixture Wasserstein distance MW2"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"