Learn R Programming

LOMAR (version 0.5.0)

GMM_Wd: GMM_Wd

Description

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

Usage

GMM_Wd(m1, m2, S1, S2, w1 = NULL, w2 = NULL, S = NULL)

Value

list of distance value d and optimal transport matrix ot

Arguments

m1

matrix of means of first GMM

m2

matrix of means of second GMM

S1

array of covariance matrices of first GMM such that m1[i,] has covariance matrix S1[,,i]

S2

array of covariance matrices of second GMM such that m2[i,] has covariance matrix S2[,,i]

w1

(optional) vector of mixture weights of first GMM.

w2

(optional) vector of mixture weights of second GMM.

S

(optional) array of pre-computed sqrtm(sqrtm(S1[,,i]) %*% S2[,,j] %*% sqrtm(S1[,,i]))