ot.gaussian

Optimal transport for Gaussian distributions

Functions

ot.gaussian.bures_wasserstein_barycenter(m, C, weights=None, num_iter=1000, eps=1e-07, log=False)[source]

Return OT linear operator between samples.

The function estimates the optimal barycenter of the empirical distributions. This is equivalent to resolving the fixed point

algorithm for multiple Gaussian distributions \(\left{\mathcal{N}(\mu,\Sigma)\right}_{i=1}^n\)

[1].

The barycenter still following a Gaussian distribution \(\mathcal{N}(\mu_b,\Sigma_b)\) where :

\[\mu_b = \sum_{i=1}^n w_i \mu_i\]

And the barycentric covariance is the solution of the following fixed-point algorithm:

\[\Sigma_b = \sum_{i=1}^n w_i \left(\Sigma_b^{1/2}\Sigma_i^{1/2}\Sigma_b^{1/2}\right)^{1/2}\]
Parameters:
  • m (array-like (k,d)) – mean of k distributions

  • C (array-like (k,d,d)) – covariance of k distributions

  • weights (array-like (k), optional) – weights for each distribution

  • num_iter (int, optional) – number of iteration for the fixed point algorithm

  • eps (float, optional) – tolerance for the fixed point algorithm

  • log (bool, optional) – record log if True

Returns:

  • mb ((d,) array-like) – mean of the barycenter

  • Cb ((d, d) array-like) – covariance of the barycenter

  • log (dict) – log dictionary return only if log==True in parameters

References

Examples using ot.gaussian.bures_wasserstein_barycenter

Gaussian Bures-Wasserstein barycenters

Gaussian Bures-Wasserstein barycenters
ot.gaussian.bures_wasserstein_distance(ms, mt, Cs, Ct, log=False)[source]

Return Bures Wasserstein distance between samples.

The function estimates the Bures-Wasserstein distance between two empirical distributions source \(\mu_s\) and target \(\mu_t\), discussed in remark 2.31 [1].

The Bures Wasserstein distance between source and target distribution \(\mathcal{W}\)

\[\mathcal{W}(\mu_s, \mu_t)_2^2= \left\lVert \mathbf{m}_s - \mathbf{m}_t \right\rVert^2 + \mathcal{B}(\Sigma_s, \Sigma_t)^{2}\]

where :

\[\mathbf{B}(\Sigma_s, \Sigma_t)^{2} = \text{Tr}\left(\Sigma_s + \Sigma_t - 2 \sqrt{\Sigma_s^{1/2}\Sigma_t\Sigma_s^{1/2}} \right)\]
Parameters:
  • ms (array-like (d,)) – mean of the source distribution

  • mt (array-like (d,)) – mean of the target distribution

  • Cs (array-like (d,d)) – covariance of the source distribution

  • Ct (array-like (d,d)) – covariance of the target distribution

  • log (bool, optional) – record log if True

Returns:

  • W (float) – Bures Wasserstein distance

  • log (dict) – log dictionary return only if log==True in parameters

References

ot.gaussian.bures_wasserstein_mapping(ms, mt, Cs, Ct, log=False)[source]

Return OT linear operator between samples.

The function estimates the optimal linear operator that aligns the two empirical distributions. This is equivalent to estimating the closed form mapping between two Gaussian distributions \(\mathcal{N}(\mu_s,\Sigma_s)\) and \(\mathcal{N}(\mu_t,\Sigma_t)\) as proposed in [1] and discussed in remark 2.29 in [2].

The linear operator from source to target \(M\)

\[M(\mathbf{x})= \mathbf{A} \mathbf{x} + \mathbf{b}\]

where :

\[ \begin{align}\begin{aligned}\mathbf{A} &= \Sigma_s^{-1/2} \left(\Sigma_s^{1/2}\Sigma_t\Sigma_s^{1/2} \right)^{1/2} \Sigma_s^{-1/2}\\\mathbf{b} &= \mu_t - \mathbf{A} \mu_s\end{aligned}\end{align} \]
Parameters:
  • ms (array-like (d,)) – mean of the source distribution

  • mt (array-like (d,)) – mean of the target distribution

  • Cs (array-like (d,d)) – covariance of the source distribution

  • Ct (array-like (d,d)) – covariance of the target distribution

  • log (bool, optional) – record log if True

Returns:

  • A ((d, d) array-like) – Linear operator

  • b ((1, d) array-like) – bias

  • log (dict) – log dictionary return only if log==True in parameters

References

ot.gaussian.empirical_bures_wasserstein_barycenter(X, reg=1e-06, weights=None, num_iter=1000, eps=1e-07, w=None, bias=True, log=False)[source]

Return OT linear operator between samples.

The function estimates the optimal barycenter of the empirical distributions. This is equivalent to resolving the fixed point

algorithm for multiple Gaussian distributions \(\left{\mathcal{N}(\mu,\Sigma)\right}_{i=1}^n\)

[1].

The barycenter still following a Gaussian distribution \(\mathcal{N}(\mu_b,\Sigma_b)\) where :

\[\mu_b = \sum_{i=1}^n w_i \mu_i\]

And the barycentric covariance is the solution of the following fixed-point algorithm:

\[\Sigma_b = \sum_{i=1}^n w_i \left(\Sigma_b^{1/2}\Sigma_i^{1/2}\Sigma_b^{1/2}\right)^{1/2}\]
Parameters:
  • X (list of array-like (n,d)) – samples in each distribution

  • reg (float,optional) – regularization added to the diagonals of covariances (>0)

  • weights (array-like (n,), optional) – weights for each distribution

  • num_iter (int, optional) – number of iteration for the fixed point algorithm

  • eps (float, optional) – tolerance for the fixed point algorithm

  • w (list of array-like (n,), optional) – weights for each sample in each distribution

  • bias (boolean, optional) – estimate bias \(\mathbf{b}\) else \(\mathbf{b} = 0\) (default:True)

  • log (bool, optional) – record log if True

Returns:

  • mb ((d,) array-like) – mean of the barycenter

  • Cb ((d, d) array-like) – covariance of the barycenter

  • log (dict) – log dictionary return only if log==True in parameters

References

ot.gaussian.empirical_bures_wasserstein_distance(xs, xt, reg=1e-06, ws=None, wt=None, bias=True, log=False)[source]

Return Bures Wasserstein distance from mean and covariance of distribution.

The function estimates the Bures-Wasserstein distance between two empirical distributions source \(\mu_s\) and target \(\mu_t\), discussed in remark 2.31 [1].

The Bures Wasserstein distance between source and target distribution \(\mathcal{W}\)

\[\mathcal{W}(\mu_s, \mu_t)_2^2= \left\lVert \mathbf{m}_s - \mathbf{m}_t \right\rVert^2 + \mathcal{B}(\Sigma_s, \Sigma_t)^{2}\]

where :

\[\mathbf{B}(\Sigma_s, \Sigma_t)^{2} = \text{Tr}\left(\Sigma_s + \Sigma_t - 2 \sqrt{\Sigma_s^{1/2}\Sigma_t\Sigma_s^{1/2}} \right)\]
Parameters:
  • xs (array-like (ns,d)) – samples in the source domain

  • xt (array-like (nt,d)) – samples in the target domain

  • reg (float,optional) – regularization added to the diagonals of covariances (>0)

  • ws (array-like (ns), optional) – weights for the source samples

  • wt (array-like (ns), optional) – weights for the target samples

  • bias (boolean, optional) – estimate bias \(\mathbf{b}\) else \(\mathbf{b} = 0\) (default:True)

  • log (bool, optional) – record log if True

Returns:

  • W (float) – Bures Wasserstein distance

  • log (dict) – log dictionary return only if log==True in parameters

References

ot.gaussian.empirical_bures_wasserstein_mapping(xs, xt, reg=1e-06, ws=None, wt=None, bias=True, log=False)[source]

Return OT linear operator between samples.

The function estimates the optimal linear operator that aligns the two empirical distributions. This is equivalent to estimating the closed form mapping between two Gaussian distributions \(\mathcal{N}(\mu_s,\Sigma_s)\) and \(\mathcal{N}(\mu_t,\Sigma_t)\) as proposed in [1] and discussed in remark 2.29 in [2].

The linear operator from source to target \(M\)

\[M(\mathbf{x})= \mathbf{A} \mathbf{x} + \mathbf{b}\]

where :

\[ \begin{align}\begin{aligned}\mathbf{A} &= \Sigma_s^{-1/2} \left(\Sigma_s^{1/2}\Sigma_t\Sigma_s^{1/2} \right)^{1/2} \Sigma_s^{-1/2}\\\mathbf{b} &= \mu_t - \mathbf{A} \mu_s\end{aligned}\end{align} \]
Parameters:
  • xs (array-like (ns,d)) – samples in the source domain

  • xt (array-like (nt,d)) – samples in the target domain

  • reg (float,optional) – regularization added to the diagonals of covariances (>0)

  • ws (array-like (ns,1), optional) – weights for the source samples

  • wt (array-like (ns,1), optional) – weights for the target samples

  • bias (boolean, optional) – estimate bias \(\mathbf{b}\) else \(\mathbf{b} = 0\) (default:True)

  • log (bool, optional) – record log if True

Returns:

  • A ((d, d) array-like) – Linear operator

  • b ((1, d) array-like) – bias

  • log (dict) – log dictionary return only if log==True in parameters

References

Examples using ot.gaussian.empirical_bures_wasserstein_mapping

Linear OT mapping estimation

Linear OT mapping estimation
ot.gaussian.empirical_gaussian_gromov_wasserstein_distance(xs, xt, ws=None, wt=None, log=False)[source]

Return Gaussian Gromov-Wasserstein distance between samples.

The function estimates the Gaussian Gromov-Wasserstein distance between two Gaussien distributions source \(\mu_s\) and target \(\mu_t\), whose parameters are estimated from the provided samples \(\mathcal{X}_s\) and \(\mathcal{X}_t\). See [57] Theorem 4.1 for more details.

Parameters:
  • xs (array-like (ns,d)) – samples in the source domain

  • xt (array-like (nt,d)) – samples in the target domain

  • ws (array-like (ns,1), optional) – weights for the source samples

  • wt (array-like (ns,1), optional) – weights for the target samples

  • log (bool, optional) – record log if True

Returns:

G – Gaussian Gromov-Wasserstein distance

Return type:

float

References

distances between Gaussian distributions. Journal of Applied Probability, 59(4), 1178-1198.

ot.gaussian.empirical_gaussian_gromov_wasserstein_mapping(xs, xt, ws=None, wt=None, sign_eigs=None, log=False)[source]

Return Gaussian Gromov-Wasserstein mapping between samples.

The function estimates the Gaussian Gromov-Wasserstein mapping between two Gaussien distributions source \(\mu_s\) and target \(\mu_t\), whose parameters are estimated from the provided samples \(\mathcal{X}_s\) and \(\mathcal{X}_t\). See [57] Theorem 4.1 for more details.

Parameters:
  • xs (array-like (ns,ds)) – samples in the source domain

  • xt (array-like (nt,dt)) – samples in the target domain

  • ws (array-like (ns,1), optional) – weights for the source samples

  • wt (array-like (ns,1), optional) – weights for the target samples

  • sign_eigs (array-like (min(ds,dt),) or string, optional) – sign of the eigenvalues of the mapping matrix, by default all signs will be positive. If ‘skewness’ is provided, the sign of the eigenvalues is selected as the product of the sign of the skewness of the projected data.

  • log (bool, optional) – record log if True

Returns:

  • A ((dt, ds) array-like) – Linear operator

  • b ((1, dt) array-like) – bias

  • .. _references-empirical_gaussian_gromov_wasserstein_mapping

References

distances between Gaussian distributions. Journal of Applied Probability, 59(4), 1178-1198.

Examples using ot.gaussian.empirical_gaussian_gromov_wasserstein_mapping

Linear OT mapping estimation

Linear OT mapping estimation
ot.gaussian.gaussian_gromov_wasserstein_distance(Cov_s, Cov_t, log=False)[source]

Return the Gaussian Gromov-Wasserstein value from [57].

This function return the closed form value of the Gaussian Gromov-Wasserstein distance between two Gaussian distributions \(\mathcal{N}(\mu_s,\Sigma_s)\) and \(\mathcal{N}(\mu_t,\Sigma_t)\) when the OT plan is assumed to be also Gaussian. See [57] Theorem 4.1 for more details.

Parameters:
  • Cov_s (array-like (ds,ds)) – covariance of the source distribution

  • Cov_t (array-like (dt,dt)) – covariance of the target distribution

Returns:

G – Gaussian Gromov-Wasserstein distance

Return type:

float

References

distances between Gaussian distributions. Journal of Applied Probability, 59(4), 1178-1198.

ot.gaussian.gaussian_gromov_wasserstein_mapping(mu_s, mu_t, Cov_s, Cov_t, sign_eigs=None, log=False)[source]

Return the Gaussian Gromov-Wasserstein mapping from [57].

This function return the closed form value of the Gaussian Gromov-Wasserstein mapping between two Gaussian distributions \(\mathcal{N}(\mu_s,\Sigma_s)\) and \(\mathcal{N}(\mu_t,\Sigma_t)\) when the OT plan is assumed to be also Gaussian. See [57] Theorem 4.1 for more details.

Parameters:
  • mu_s (array-like (ds,)) – mean of the source distribution

  • mu_t (array-like (dt,)) – mean of the target distribution

  • Cov_s (array-like (ds,ds)) – covariance of the source distribution

  • Cov_t (array-like (dt,dt)) – covariance of the target distribution

  • log (bool, optional) – record log if True

Returns:

  • A ((dt, ds) array-like) – Linear operator

  • b ((1, dt) array-like) – bias

References

distances between Gaussian distributions. Journal of Applied Probability, 59(4), 1178-1198.

ot.gaussian.bures_wasserstein_barycenter(m, C, weights=None, num_iter=1000, eps=1e-07, log=False)[source]

Return OT linear operator between samples.

The function estimates the optimal barycenter of the empirical distributions. This is equivalent to resolving the fixed point

algorithm for multiple Gaussian distributions \(\left{\mathcal{N}(\mu,\Sigma)\right}_{i=1}^n\)

[1].

The barycenter still following a Gaussian distribution \(\mathcal{N}(\mu_b,\Sigma_b)\) where :

\[\mu_b = \sum_{i=1}^n w_i \mu_i\]

And the barycentric covariance is the solution of the following fixed-point algorithm:

\[\Sigma_b = \sum_{i=1}^n w_i \left(\Sigma_b^{1/2}\Sigma_i^{1/2}\Sigma_b^{1/2}\right)^{1/2}\]
Parameters:
  • m (array-like (k,d)) – mean of k distributions

  • C (array-like (k,d,d)) – covariance of k distributions

  • weights (array-like (k), optional) – weights for each distribution

  • num_iter (int, optional) – number of iteration for the fixed point algorithm

  • eps (float, optional) – tolerance for the fixed point algorithm

  • log (bool, optional) – record log if True

Returns:

  • mb ((d,) array-like) – mean of the barycenter

  • Cb ((d, d) array-like) – covariance of the barycenter

  • log (dict) – log dictionary return only if log==True in parameters

References

ot.gaussian.bures_wasserstein_distance(ms, mt, Cs, Ct, log=False)[source]

Return Bures Wasserstein distance between samples.

The function estimates the Bures-Wasserstein distance between two empirical distributions source \(\mu_s\) and target \(\mu_t\), discussed in remark 2.31 [1].

The Bures Wasserstein distance between source and target distribution \(\mathcal{W}\)

\[\mathcal{W}(\mu_s, \mu_t)_2^2= \left\lVert \mathbf{m}_s - \mathbf{m}_t \right\rVert^2 + \mathcal{B}(\Sigma_s, \Sigma_t)^{2}\]

where :

\[\mathbf{B}(\Sigma_s, \Sigma_t)^{2} = \text{Tr}\left(\Sigma_s + \Sigma_t - 2 \sqrt{\Sigma_s^{1/2}\Sigma_t\Sigma_s^{1/2}} \right)\]
Parameters:
  • ms (array-like (d,)) – mean of the source distribution

  • mt (array-like (d,)) – mean of the target distribution

  • Cs (array-like (d,d)) – covariance of the source distribution

  • Ct (array-like (d,d)) – covariance of the target distribution

  • log (bool, optional) – record log if True

Returns:

  • W (float) – Bures Wasserstein distance

  • log (dict) – log dictionary return only if log==True in parameters

References

ot.gaussian.bures_wasserstein_mapping(ms, mt, Cs, Ct, log=False)[source]

Return OT linear operator between samples.

The function estimates the optimal linear operator that aligns the two empirical distributions. This is equivalent to estimating the closed form mapping between two Gaussian distributions \(\mathcal{N}(\mu_s,\Sigma_s)\) and \(\mathcal{N}(\mu_t,\Sigma_t)\) as proposed in [1] and discussed in remark 2.29 in [2].

The linear operator from source to target \(M\)

\[M(\mathbf{x})= \mathbf{A} \mathbf{x} + \mathbf{b}\]

where :

\[ \begin{align}\begin{aligned}\mathbf{A} &= \Sigma_s^{-1/2} \left(\Sigma_s^{1/2}\Sigma_t\Sigma_s^{1/2} \right)^{1/2} \Sigma_s^{-1/2}\\\mathbf{b} &= \mu_t - \mathbf{A} \mu_s\end{aligned}\end{align} \]
Parameters:
  • ms (array-like (d,)) – mean of the source distribution

  • mt (array-like (d,)) – mean of the target distribution

  • Cs (array-like (d,d)) – covariance of the source distribution

  • Ct (array-like (d,d)) – covariance of the target distribution

  • log (bool, optional) – record log if True

Returns:

  • A ((d, d) array-like) – Linear operator

  • b ((1, d) array-like) – bias

  • log (dict) – log dictionary return only if log==True in parameters

References

ot.gaussian.empirical_bures_wasserstein_barycenter(X, reg=1e-06, weights=None, num_iter=1000, eps=1e-07, w=None, bias=True, log=False)[source]

Return OT linear operator between samples.

The function estimates the optimal barycenter of the empirical distributions. This is equivalent to resolving the fixed point

algorithm for multiple Gaussian distributions \(\left{\mathcal{N}(\mu,\Sigma)\right}_{i=1}^n\)

[1].

The barycenter still following a Gaussian distribution \(\mathcal{N}(\mu_b,\Sigma_b)\) where :

\[\mu_b = \sum_{i=1}^n w_i \mu_i\]

And the barycentric covariance is the solution of the following fixed-point algorithm:

\[\Sigma_b = \sum_{i=1}^n w_i \left(\Sigma_b^{1/2}\Sigma_i^{1/2}\Sigma_b^{1/2}\right)^{1/2}\]
Parameters:
  • X (list of array-like (n,d)) – samples in each distribution

  • reg (float,optional) – regularization added to the diagonals of covariances (>0)

  • weights (array-like (n,), optional) – weights for each distribution

  • num_iter (int, optional) – number of iteration for the fixed point algorithm

  • eps (float, optional) – tolerance for the fixed point algorithm

  • w (list of array-like (n,), optional) – weights for each sample in each distribution

  • bias (boolean, optional) – estimate bias \(\mathbf{b}\) else \(\mathbf{b} = 0\) (default:True)

  • log (bool, optional) – record log if True

Returns:

  • mb ((d,) array-like) – mean of the barycenter

  • Cb ((d, d) array-like) – covariance of the barycenter

  • log (dict) – log dictionary return only if log==True in parameters

References

ot.gaussian.empirical_bures_wasserstein_distance(xs, xt, reg=1e-06, ws=None, wt=None, bias=True, log=False)[source]

Return Bures Wasserstein distance from mean and covariance of distribution.

The function estimates the Bures-Wasserstein distance between two empirical distributions source \(\mu_s\) and target \(\mu_t\), discussed in remark 2.31 [1].

The Bures Wasserstein distance between source and target distribution \(\mathcal{W}\)

\[\mathcal{W}(\mu_s, \mu_t)_2^2= \left\lVert \mathbf{m}_s - \mathbf{m}_t \right\rVert^2 + \mathcal{B}(\Sigma_s, \Sigma_t)^{2}\]

where :

\[\mathbf{B}(\Sigma_s, \Sigma_t)^{2} = \text{Tr}\left(\Sigma_s + \Sigma_t - 2 \sqrt{\Sigma_s^{1/2}\Sigma_t\Sigma_s^{1/2}} \right)\]
Parameters:
  • xs (array-like (ns,d)) – samples in the source domain

  • xt (array-like (nt,d)) – samples in the target domain

  • reg (float,optional) – regularization added to the diagonals of covariances (>0)

  • ws (array-like (ns), optional) – weights for the source samples

  • wt (array-like (ns), optional) – weights for the target samples

  • bias (boolean, optional) – estimate bias \(\mathbf{b}\) else \(\mathbf{b} = 0\) (default:True)

  • log (bool, optional) – record log if True

Returns:

  • W (float) – Bures Wasserstein distance

  • log (dict) – log dictionary return only if log==True in parameters

References

ot.gaussian.empirical_bures_wasserstein_mapping(xs, xt, reg=1e-06, ws=None, wt=None, bias=True, log=False)[source]

Return OT linear operator between samples.

The function estimates the optimal linear operator that aligns the two empirical distributions. This is equivalent to estimating the closed form mapping between two Gaussian distributions \(\mathcal{N}(\mu_s,\Sigma_s)\) and \(\mathcal{N}(\mu_t,\Sigma_t)\) as proposed in [1] and discussed in remark 2.29 in [2].

The linear operator from source to target \(M\)

\[M(\mathbf{x})= \mathbf{A} \mathbf{x} + \mathbf{b}\]

where :

\[ \begin{align}\begin{aligned}\mathbf{A} &= \Sigma_s^{-1/2} \left(\Sigma_s^{1/2}\Sigma_t\Sigma_s^{1/2} \right)^{1/2} \Sigma_s^{-1/2}\\\mathbf{b} &= \mu_t - \mathbf{A} \mu_s\end{aligned}\end{align} \]
Parameters:
  • xs (array-like (ns,d)) – samples in the source domain

  • xt (array-like (nt,d)) – samples in the target domain

  • reg (float,optional) – regularization added to the diagonals of covariances (>0)

  • ws (array-like (ns,1), optional) – weights for the source samples

  • wt (array-like (ns,1), optional) – weights for the target samples

  • bias (boolean, optional) – estimate bias \(\mathbf{b}\) else \(\mathbf{b} = 0\) (default:True)

  • log (bool, optional) – record log if True

Returns:

  • A ((d, d) array-like) – Linear operator

  • b ((1, d) array-like) – bias

  • log (dict) – log dictionary return only if log==True in parameters

References

ot.gaussian.empirical_gaussian_gromov_wasserstein_distance(xs, xt, ws=None, wt=None, log=False)[source]

Return Gaussian Gromov-Wasserstein distance between samples.

The function estimates the Gaussian Gromov-Wasserstein distance between two Gaussien distributions source \(\mu_s\) and target \(\mu_t\), whose parameters are estimated from the provided samples \(\mathcal{X}_s\) and \(\mathcal{X}_t\). See [57] Theorem 4.1 for more details.

Parameters:
  • xs (array-like (ns,d)) – samples in the source domain

  • xt (array-like (nt,d)) – samples in the target domain

  • ws (array-like (ns,1), optional) – weights for the source samples

  • wt (array-like (ns,1), optional) – weights for the target samples

  • log (bool, optional) – record log if True

Returns:

G – Gaussian Gromov-Wasserstein distance

Return type:

float

References

distances between Gaussian distributions. Journal of Applied Probability, 59(4), 1178-1198.

ot.gaussian.empirical_gaussian_gromov_wasserstein_mapping(xs, xt, ws=None, wt=None, sign_eigs=None, log=False)[source]

Return Gaussian Gromov-Wasserstein mapping between samples.

The function estimates the Gaussian Gromov-Wasserstein mapping between two Gaussien distributions source \(\mu_s\) and target \(\mu_t\), whose parameters are estimated from the provided samples \(\mathcal{X}_s\) and \(\mathcal{X}_t\). See [57] Theorem 4.1 for more details.

Parameters:
  • xs (array-like (ns,ds)) – samples in the source domain

  • xt (array-like (nt,dt)) – samples in the target domain

  • ws (array-like (ns,1), optional) – weights for the source samples

  • wt (array-like (ns,1), optional) – weights for the target samples

  • sign_eigs (array-like (min(ds,dt),) or string, optional) – sign of the eigenvalues of the mapping matrix, by default all signs will be positive. If ‘skewness’ is provided, the sign of the eigenvalues is selected as the product of the sign of the skewness of the projected data.

  • log (bool, optional) – record log if True

Returns:

  • A ((dt, ds) array-like) – Linear operator

  • b ((1, dt) array-like) – bias

  • .. _references-empirical_gaussian_gromov_wasserstein_mapping

References

distances between Gaussian distributions. Journal of Applied Probability, 59(4), 1178-1198.

ot.gaussian.gaussian_gromov_wasserstein_distance(Cov_s, Cov_t, log=False)[source]

Return the Gaussian Gromov-Wasserstein value from [57].

This function return the closed form value of the Gaussian Gromov-Wasserstein distance between two Gaussian distributions \(\mathcal{N}(\mu_s,\Sigma_s)\) and \(\mathcal{N}(\mu_t,\Sigma_t)\) when the OT plan is assumed to be also Gaussian. See [57] Theorem 4.1 for more details.

Parameters:
  • Cov_s (array-like (ds,ds)) – covariance of the source distribution

  • Cov_t (array-like (dt,dt)) – covariance of the target distribution

Returns:

G – Gaussian Gromov-Wasserstein distance

Return type:

float

References

distances between Gaussian distributions. Journal of Applied Probability, 59(4), 1178-1198.

ot.gaussian.gaussian_gromov_wasserstein_mapping(mu_s, mu_t, Cov_s, Cov_t, sign_eigs=None, log=False)[source]

Return the Gaussian Gromov-Wasserstein mapping from [57].

This function return the closed form value of the Gaussian Gromov-Wasserstein mapping between two Gaussian distributions \(\mathcal{N}(\mu_s,\Sigma_s)\) and \(\mathcal{N}(\mu_t,\Sigma_t)\) when the OT plan is assumed to be also Gaussian. See [57] Theorem 4.1 for more details.

Parameters:
  • mu_s (array-like (ds,)) – mean of the source distribution

  • mu_t (array-like (dt,)) – mean of the target distribution

  • Cov_s (array-like (ds,ds)) – covariance of the source distribution

  • Cov_t (array-like (dt,dt)) – covariance of the target distribution

  • log (bool, optional) – record log if True

Returns:

  • A ((dt, ds) array-like) – Linear operator

  • b ((1, dt) array-like) – bias

References

distances between Gaussian distributions. Journal of Applied Probability, 59(4), 1178-1198.