pyriemann.geometry.mean.mean_chol¶
- pyriemann.geometry.mean.mean_chol(X, sample_weight=None, **kwargs)[source]¶
Mean of SPD/HPD matrices according to the Cholesky metric.
Cholesky mean \(\mathbf{M}\) is \(\mathbf{M} = \mathbf{L} \mathbf{L}^H\), where \(\mathbf{L}\) is computed as [1]:
\[\mathbf{L} = \sum_i w_i \text{chol}(\mathbf{X}_i)\]with \(w\) being the weights which sum to 1.
- Parameters:
- Xndarray, shape (…, n_matrices, n, n)
Set of SPD/HPD matrices.
- sample_weightNone | ndarray, shape (n_matrices,), default=None
Weights for each matrix. If None, it uses equal weights.
- Returns:
- Mndarray, shape (…, n, n)
Cholesky mean.
See also
Notes
Added in version 0.10.
Changed in version 0.12: Add support for NumPy and PyTorch.
References
[1]Non-Euclidean statistics for covariance matrices, with applications to diffusion tensor imaging I.L. Dryden, A. Koloydenko, D. Zhou. Ann Appl Stat, 2009, 3(3), pp. 1102-1123.