spd.mean | R Documentation |
Function computes the mean of a set of symmetric positive-definite matrices.
Several methods are implemented, as described in Details
.
spd.mean(x, method = "euclidean", ...)
x |
A list of symmetric, positive-definite matrices |
method |
The type of mean to compute. See details |
... |
Further arguments. See 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')
The mean of the matrices in x
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.