pyriemann.utils.mean.mean_euclid

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

Mean of matrices according to the Euclidean metric.

\[\mathbf{C} = \frac{1}{m} \sum_i \mathbf{C}_i\]

This mean is also called arithmetic.

Parameters
covmatsndarray, shape (n_matrices, n_channels, n_channels)

Set of 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)

Euclidean mean.