pyriemann.utils.geodesic.geodesic

pyriemann.utils.geodesic.geodesic(A, B, alpha, metric='riemann')

Geodesic between SPD matrices according to a metric.

Return the matrix at the position alpha on the geodesic between SPD matrices A and B according to a metric.

Parameters
Andarray, shape (…, n, n)

First SPD matrices.

Bndarray, shape (…, n, n)

Second SPD matrices.

alphafloat

The position on the geodesic.

metricstring, default=’riemann’

The metric used for geodesic, can be: ‘euclid’, ‘logeuclid’, ‘riemann’.

Returns
Cndarray, shape (…, n, n)

SPD matrices on the geodesic.