pyriemann.utils.mean.mean_power(covmats, p, *, sample_weight=None, zeta=1e-09, maxiter=100)

Power mean of SPD/HPD matrices.

Power mean of order p is the solution of [1] [2]:

\[\mathbf{C} = \sum_i w_i \ \mathbf{C} \sharp_p \mathbf{X}_i\]

where \(\mathbf{A} \sharp_p \mathbf{B}\) is the geodesic between matrices \(\mathbf{A}\) and \(\mathbf{B}\).

covmatsndarray, shape (n_matrices, n, n)

Set of SPD/HPD matrices.


Exponent, in [-1,+1]. For p=0, it returns pyriemann.utils.mean.mean_riemann().

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

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

zetafloat, default=10e-10

Stopping criterion.

maxiterint, default=100

The maximum number of iterations.

Cndarray, shape (n, n)

Power mean.

See also



New in version 0.3.



Matrix Power means and the Karcher mean Y. Lim and M. Palfia. Journal of Functional Analysis, Volume 262, Issue 4, 15 February 2012, Pages 1498-1514.


Fixed Point Algorithms for Estimating Power Means of Positive Definite Matrices M. Congedo, A. Barachant, and R. Bhatia. IEEE Transactions on Signal Processing, Volume 65, Issue 9, pp.2211-2220, May 2017