CovFMean {frechet}R Documentation

Fréchet mean of covariance matrices

Description

Fréchet mean computation for covariance matrices.

Usage

CovFMean(M = NULL, optns = list())

Arguments

M

A q by q by n array (resp. a list of q by q matrices) where M[,,i] (resp. M[[i]]) contains the i-th covariance matrix of dimension q by q.

optns

A list of options control parameters specified by list(name=value). See ‘Details’.

Details

Available control options are

metric

Metric type choice, "frobenius", "power", "log_cholesky", "cholesky" - default: "frobenius" which corresponds to the power metric with alpha equal to 1.

alpha

The power parameter for the power metric, which can be any non-negative number. Default is 1 which corresponds to Frobenius metric.

weights

A vector of weights to compute the weighted barycenter. The length of weights is equal to the sample size n. Default is equal weights.

Value

A list containing the following fields:

Mout

A list containing the Fréchet mean of the covariance matrices in M.

optns

A list containing the optns parameters utilized.

References

Examples

#Example M input
n=10 #sample size
m=5 # dimension of covariance matrices
M <- array(0,c(m,m,n))
for (i in 1:n){
 y0=rnorm(m)
 aux<-diag(m)+y0%*%t(y0)
 M[,,i]<-aux
}
Fmean=CovFMean(M=M,optns=list(metric="frobenius"))


[Package frechet version 0.3.0 Index]