pyriemann.utils.distance.distance_chol¶
- pyriemann.utils.distance.distance_chol(A, B, squared=False)¶
Cholesky distance between SPD/HPD matrices.
The Cholesky distance between two SPD/HPD matrices \(\mathbf{A}\) and \(\mathbf{B}\) is [1]:
\[d(\mathbf{A},\mathbf{B}) = \Vert \text{chol}(\mathbf{A}) - \text{chol}(\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.
- squaredbool, default=False
Return squared distance.
- Returns:
- dfloat or ndarray, shape (…,)
Cholesky distance between A and B.
See also
Notes
Added in version 0.7.
References
[1]Non-Euclidean statistics for covariance matrices, with applications to diffusion tensor imaging I.L. Dryden, A. Koloydenko, D. Zhou. Ann Appl Stat, 2009, 3(3), pp. 1102-1123.