pyriemann.geometry.mean.mean_euclid

pyriemann.geometry.mean.mean_euclid(X, sample_weight=None, **kwargs)[source]

Mean of matrices according to the Euclidean metric.

Euclidean mean is also called arithmetic:

\[\mathbf{M} = \sum_i w_i \ \mathbf{X}_i\]

with \(w\) being the weights which sum to 1.

Parameters:
Xndarray, shape (…, n_matrices, n, m)

Set of matrices.

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

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

Returns:
Mndarray, shape (…, n, m)

Euclidean mean.

See also

gmean

Notes

Changed in version 0.12: Add support for NumPy and PyTorch.