pyriemann.geometry.geodesic.geodesic¶
- pyriemann.geometry.geodesic.geodesic(A, B, alpha, metric='riemann')[source]¶
Geodesic between matrices according to a metric.
Return the matrix at the position alpha on the geodesic between matrices A and B according to a metric.
\(\mathbf{C}\) is equal to \(\mathbf{A}\) if \(\alpha\) = 0, and \(\mathbf{B}\) if \(\alpha\) = 1.
- Parameters:
- Andarray, shape (…, n, n)
First matrices.
- Bndarray, shape (…, n, n)
Second matrices.
- alphafloat | ndarray, shape (…,)
Position on the geodesic. If ndarray, one value per matrix pair.
Changed in version 0.12.
- metricstring | callable, default=”riemann”
Metric used for geodesic, can be: “chol”, “euclid”, “logchol”, “logeuclid”, “riemann”, “thompson”, “wasserstein”, or a callable function.
- Returns:
- Cndarray, shape (…, n, n)
Matrices on the geodesic.
See also
Notes
Changed in version 0.12: Add support for NumPy and PyTorch. Add support for array-valued alpha.