Skip to contents

Averaging over directions wastes most of the budget on slices where the two clouds already agree; in high dimension almost every random direction is such a slice, and the sliced distance decays. Keeping only the maximising direction gives a sharper discrepancy and, as a by-product, the direction itself.

Usage

Otmsw(X, Y, p = 2, n_proj = 32)

Arguments

X, Y

Two point clouds with the same number of points.

p

Exponent, positive.

n_proj

Number of candidate directions searched.

Value

List with MSW, theta_star, idx_star, per_proj, n, d, n_proj.

Details

Formula: max_theta W_p(P_theta mu, P_theta nu) over unit directions – Deshpande et al. (2019) eq. (3).

References

Deshpande, I. et al. (2019). Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 10640-10648. doi:10.1109/CVPR.2019.01090 .

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Otmsw(V, V)
#> $MSW
#> [1] 0
#> 
#> $theta_star
#> [1] 1
#> 
#> $idx_star
#> [1] 0
#> 
#> $per_proj
#>  [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#> 
#> $n
#> [1] 8
#> 
#> $d
#> [1] 1
#> 
#> $n_proj
#> [1] 32
#> 
#> $method
#> [1] "Max-sliced Wasserstein distance"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"