pyriemann.utils.distance.distance_euclid

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

Euclidean distance between matrices.

The Euclidean distance between two 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\]
Parameters
Andarray, shape (…, n, m)

First matrices, at least 2D ndarray.

Bndarray, shape (…, n, m)

Second matrices, same dimensions as A.

Returns
dndarray, shape (…,) or float

Euclidean distance between A and B.