spd_learn.functional.distance_poweuclid#
- spd_learn.functional.distance_poweuclid(A, B, p, squared=False)[source]#
Power Euclidean distance between SPD/HPD matrices.
The power Euclidean distance of order \(p\) between two SPD/HPD matrices \(\mathbf{A}\) and \(\mathbf{B}\) is [1]:
\[d(\mathbf{A},\mathbf{B}) = \frac{1}{|p|} \Vert \mathbf{A}^p - \mathbf{B}^p \Vert_F\]- Parameters:
- Returns:
d – Power Euclidean distance between A and B.
- Return type:
float or ndarray, shape (…,)
Notes
Added in version 0.7.
Changed in version 0.12: Add support for NumPy and PyTorch.
See also
References
[1]Power Euclidean metrics for covariance matrices with application to diffusion tensor imaging I.L. Dryden, X. Pennec, & J.M. Peyrat. arXiv, 2010