pyriemann.utils.mean.nanmean_riemann(X=None, tol=1e-08, maxiter=100, init=None, sample_weight=None, covmats=None)

Riemannian NaN-mean of SPD/HPD matrices.

The Riemannian NaN-mean is the masked Riemannian mean applied to SPD/HPD matrices potentially corrupted by symmetric NaN values [1].

Xndarray, shape (n_matrices, n, n)

Set of SPD/HPD matrices, corrupted by symmetric NaN values [1].

tolfloat, default=10e-9

The tolerance to stop the gradient descent.

maxiterint, default=100

The maximum number of iteration.

initNone | ndarray, shape (n, n), default=None

A SPD/HPD matrix used to initialize the gradient descent. If None, a regularized Euclidean NaN-mean is used.

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

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

Mndarray, shape (n, n)

Riemannian NaN-mean.


New in version 0.3.


[1] (1,2)

Geodesically-convex optimization for averaging partially observed covariance matrices F. Yger, S. Chevallier, Q. Barthélemy, and S. Sra. Asian Conference on Machine Learning (ACML), Nov 2020, Bangkok, Thailand. pp.417 - 432.