Compute 2-Wasserstein distance between two Gaussian mixture models See: Delon J, Desolneux A. (2019) A Wasserstein-type distance in the space of Gaussian Mixture Models. hal-02178204v2
GMM_Wd(m1, m2, S1, S2, w1 = NULL, w2 = NULL, S = NULL)
list of distance value d and optimal transport matrix ot
matrix of means of first GMM
matrix of means of second GMM
array of covariance matrices of first GMM such that m1[i,] has covariance matrix S1[,,i]
array of covariance matrices of second GMM such that m2[i,] has covariance matrix S2[,,i]
(optional) vector of mixture weights of first GMM.
(optional) vector of mixture weights of second GMM.
(optional) array of pre-computed sqrtm(sqrtm(S1[,,i]) %*% S2[,,j] %*% sqrtm(S1[,,i]))