spd_learn.functional.mean_bmp#

spd_learn.functional.mean_bmp(X, *, tol=1e-07, maxiter=50, sample_weight=None)[source]#

Bini-Meini-Poloni (BMP) mean of SPD/HPD matrices.

Bini-Meini-Poloni (BMP) mean is computed recursively [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 – BMP mean.

Return type:

ndarray, shape (n, n)

Notes

Added in version 0.12.

See also

gmean

References

[1]

An effective matrix geometric mean satisfying the Ando–Li–Mathias properties D. Bini, B. Meini and F. Poloni. Mathematics of Computation. 2010