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

distance

Notes

Added in version 0.7.

References