pyriemann.utils.mean.mean_logeuclid

pyriemann.utils.mean.mean_logeuclid(covmats, sample_weight=None)

Mean of SPD matrices according to the log-Euclidean metric.

Log-Euclidean mean is [1]:

\[\mathbf{C} = \exp{(\frac{1}{m} \sum_i \log{\mathbf{C}_i})}\]
Parameters
covmatsndarray, shape (n_matrices, n_channels, n_channels)

Set of SPD matrices.

sample_weightNone | ndarray, shape (n_matrices,), default=None

Weights for each matrix. If None, it uses equal weights.

Returns
Cndarray, shape (n_channels, n_channels)

Log-Euclidean mean.

References

1

Geometric means in a novel vector space structure on symmetric positive-definite matrices V. Arsigny, P. Fillard, X. Pennec, and N. Ayache. SIAM Journal on Matrix Analysis and Applications. Volume 29, Issue 1 (2007).