pyriemann.utils.distance.distance_euclid(A, B)

Euclidean distance between SPD matrices.

The Euclidean distance between two SPD matrices A and B is defined as the Frobenius norm of the difference of the two matrices:

\[d(\mathbf{A},\mathbf{B}) = \Vert \mathbf{A} - \mathbf{B} \Vert_F\]
Andarray, shape (…, n, n)

First SPD matrices, at least 2D ndarray.

Bndarray, shape (…, n, n)

Second SPD matrices, same dimensions as A.

dndarray, shape (…,) or float

Euclidean distance between A and B.