- pyriemann.utils.distance.distance(A, B, metric='riemann')¶
Distance between matrices according to a metric.
Compute the distance between two matrices A and B according to a metric , or between a set of matrices A and another matrix B.
- Andarray, shape (n, n) or shape (n_matrices, n, n)
First matrix, or set of matrices.
- Bndarray, shape (n, n)
- metricstring, default=’riemann’
The metric for distance, can be: ‘euclid’, ‘harmonic’, ‘kullback’, ‘kullback_right’, ‘kullback_sym’, ‘logdet’, ‘logeuclid’, ‘riemann’, ‘wasserstein’, or a callable function.
- dfloat or ndarray, shape (n_matrices, 1)
The distance(s) between A and B.
Review of Riemannian distances and divergences, applied to SSVEP-based BCI S. Chevallier, E. K. Kalunga, Q. Barthélemy, E. Monacelli. Neuroinformatics, Springer, 2021, 19 (1), pp.93-106