spd_learn.functional.mean_cheap#
- spd_learn.functional.mean_cheap(X, *, tol=1e-07, maxiter=50, sample_weight=None)[source]#
Cheap mean of SPD/HPD matrices.
Cheap mean is computed as described in [1].
- Parameters:
X (ndarray, shape (..., n_matrices, n, n)) – Set of SPD/HPD matrices.
tol (float, default=1e-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.
- Returns:
M – Cheap mean.
- Return type:
ndarray, shape (n, n)
Notes
Added in version 0.12.
See also
References
[1]A note on computing matrix geometric means D. Bini and B. Iannazzo. Advances in Computational Mathematics. 2011