pyriemann.utils.distance.distance_logdet¶
- pyriemann.utils.distance.distance_logdet(A, B)¶
Log-det distance between SPD/HPD matrices.
The log-det distance between two SPD/HPD matrices A and B is [1]:
\[d(\mathbf{A},\mathbf{B}) = \sqrt{\log(\det(\frac{\mathbf{A}+\mathbf{B}}{2})) - \frac{1}{2} \log(\det(\mathbf{A} \mathbf{B}))}\]- 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-det distance between A and B.
References
- 1
Matrix nearness problems with Bregman divergences I.S. Dhillon, J.A. Tropp. SIAM J Matrix Anal Appl, 2007, 29 (4), pp. 1120-1146