gaussBary {fdWasserstein}R Documentation

Wasserstein barycenter between Gaussian Processes

Description

Computes the Frechet mean between covariance operators with respect to the Procrustes metrics (equivalently, a Wasserstein barycenter of centered Gaussian processes with corresponding covariances) via steepest gradient descent.

Usage

gaussBary(sigma, w = rep(1, dim(sigma)[3]), gamma, sigma0.5, 
  max.iter = 30, eps = 1e-08, silent = max.iter == 0)

Arguments

sigma

An MxMxK array containing the K covariances.

w

Optional. A vector of weights of length K. If missing, each matrix is given equal weight 1.

gamma

Optional. Initialisation point for the gradient descent algorithm.

sigma0.5

Optional. An array containing the square roots of the matrices in sigma if available. The square roots are computed by gaussBary if sigma0.5 is missing.

max.iter

Maximum number of gradient descent iterations.

eps

Iterations stop when the relative decrease of the objective function in two consecutive iterations is less than 'eps'.

silent

If FALSE returns a warning if maximal number of iteration is reached.

Value

A list of 2 containing:

gamma

The MxM Frechet mean.

iter

Number of iterations needed to reach convergence, numeric.

Note

We thank Yoav Zemel for the first version of the code.

Author(s)

Valentina Masarotto, Guido Masarotto

References

Masarotto, V., Panaretos, V.M. & Zemel, Y. (2019) "Procrustes Metrics on Covariance Operators and Optimal Transportation of Gaussian Processes", Sankhya A 81, 172-213 doi:10.1007/s13171-018-0130-1

Examples

M <- 5
K <- 4

sigma <- rWishart(M, df = K, Sigma = diag(K))

gaussBary(sigma) 

[Package fdWasserstein version 1.0 Index]