pyriemann.utils.mean.nanmean_riemann¶
- pyriemann.utils.mean.nanmean_riemann(covmats, tol=1e-08, maxiter=100, init=None, sample_weight=None)¶
Riemannian NaN-mean of SPD matrices.
The Riemannian NaN-mean is the masked Riemannian mean applied to SPD matrices potentially corrupted by symmetric NaN values [1].
- Parameters
- covmatsndarray, shape (n_matrices, n_channels, n_channels)
Set of SPD 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_channels, n_channels), default=None
A SPD 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.
- Returns
- Cndarray, shape (n_channels, n_channels)
Riemannian NaN-mean.
Notes
New in version 0.3.
References
- 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.