spd_learn.functional.mean_ale#
- spd_learn.functional.mean_ale(X, *, tol=1e-06, maxiter=50, sample_weight=None, init=None)[source]#
AJD-based log-Euclidean (ALE) mean of SPD/HPD matrices.
Approximate joint diagonalization (AJD) based log-Euclidean (ALE) mean of SPD/HPD matrices [1].
- Parameters:
X (ndarray, shape (..., n_matrices, n, n)) – Set of SPD/HPD matrices.
tol (float, default=10e-7) – Tolerance to stop the gradient descent.
maxiter (int, default=50) – Maximum number of iterations.
sample_weight (None | ndarray, shape (n_matrices,), default=None) – Weights for each matrix. If None, it uses equal weights.
init (None | ndarray, shape (n, n), default=None) – A SPD/HPD matrix used to initialize the gradient descent. If None, the joint diagonalizer of input matrices is used.
- Returns:
M – ALE mean.
- Return type:
ndarray, shape (…, n, n)
Notes
Added in version 0.2.4.
Changed in version 0.12: Add support for NumPy and PyTorch.
See also
References
[1]Approximate Joint Diagonalization and Geometric Mean of Symmetric Positive Definite Matrices M. Congedo, B. Afsari, A. Barachant, M. Moakher. PLOS ONE, 2015