pyriemann.utils.distance.distance_logeuclid¶
- pyriemann.utils.distance.distance_logeuclid(A, B)¶
Log-Euclidean distance between SPD/HPD matrices.
The Log-Euclidean distance between two SPD/HPD matrices A and B is [1]:
\[d(\mathbf{A},\mathbf{B}) = \Vert \log(\mathbf{A}) - \log(\mathbf{B}) \Vert_F\]- Parameters
- Andarray, shape (…, n, n)
First SPD/HPD matrices, at least 2D ndarray.
- Bndarray, shape (…, n, n)
Second SPD/HPD matrices, same dimensions as A.
- Returns
- dndarray, shape (…,) or float
Log-Euclidean distance between A and B.
References
- 1
Geometric means in a novel vector space structure on symmetric positive-definite matrices V. Arsigny, P. Fillard, X. Pennec, N. Ayache. SIAM J Matrix Anal Appl, 2007, 29 (1), pp. 328-347