pyriemann.utils.distance.pairwise_distance(X, Y=None, metric='riemann', squared=False)

Pairwise distance matrix.

Compute the matrix of distances between pairs of elements of X and Y.

Xndarray, shape (n_matrices_X, n, n)

First set of matrices.

YNone | ndarray, shape (n_matrices_Y, n, n), default=None

Second set of matrices. If None, Y is set to X.

metricstring, default=’riemann’

Metric for pairwise distance. For the list of supported metrics, see pyriemann.utils.distance.distance().

squaredbool, default False

Return squared distances.

New in version 0.5.

distndarray, shape (n_matrices_X, n_matrices_X) or (n_matrices_X, n_matrices_Y)

Distances between pairs of elements of X if Y is None, or between elements of X and Y.

See also