pyriemann.utils.distance.distance_poweuclid¶
- pyriemann.utils.distance.distance_poweuclid(A, B, p, squared=False)¶
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:
- Andarray, shape (…, n, n)
First SPD/HPD matrices, at least 2D ndarray.
- Bndarray, shape (…, n, n)
Second SPD/HPD matrices, same dimensions as A.
- pfloat
Exponent. For p=0, it returns
pyriemann.utils.distance.distance_logeuclid()
.- squaredbool, default=False
Return squared distance.
- Returns:
- dfloat or ndarray, shape (…,)
Power Euclidean distance between A and B.
See also
Notes
Added in version 0.7.
References
[1]Power Euclidean metrics for covariance matrices with application to diffusion tensor imaging I.L. Dryden, X. Pennec, & J.M. Peyrat. arXiv, 2010