spd.mean: Compute the mean of a set of spd matrices

View source: R/spd-mean.R

spd.meanR Documentation

Compute the mean of a set of spd matrices

Description

Function computes the mean of a set of symmetric positive-definite matrices. Several methods are implemented, as described in Details.

Usage

spd.mean(x, method = "euclidean", ...)

Arguments

x

A list of symmetric, positive-definite matrices

method

The type of mean to compute. See details

...

Further arguments. See details

Details

Function computes the mean of a set of symmetrix, positive-definite matrices. Several methods are implemented:

  • "euclidean": The ordinary arithmetic mean – the sum of the matrices in x, divided by the number of matrices. This is guaranteed to be an spd matrix, but does not necessarily preserve the spectral characteristics of the individual matrices.

  • "logeuclidean": Computed by taking the arithmetic mean of the logarithms of the matrices in x, and then projecting back onto the space of spd matrices. In general, better behaved than the arithmetic mean.

  • "riemannian": The Riemmanian p-mean. Smoothly interpolates between the harmonic mean at p = -1 to the geometric mean at p = 0 to the arithmetic mean at p = 1. Is approximated iteratively using the fixed point algorithm described by Congedo, Barachant and Koopaei (2017). Requies a parameter p in the interval [-1,1] specifying the type of mean, a maximum error tolerance tol (default .01), and a maximum number of iterations (default 50). The case p = 0 is approximated by computing the p-means at -.1 and .1, and then returning the midpoint between them using spd.interpolate(..., method = 'riemannian')

Value

The mean of the matrices in x.


areshenk/spdm documentation built on Aug. 5, 2023, 12:26 a.m.