pyriemann.utils.tangentspace.tangent_space

pyriemann.utils.tangentspace.tangent_space(X, Cref, *, metric='riemann')

Transform matrices into tangent vectors.

Transform matrices into tangent vectors, according to a reference matrix Cref and to a specific logarithmic map.

Parameters:
Xndarray, shape (…, n, n)

Matrices in manifold.

Crefndarray, shape (n, n)

Reference matrix.

metricstring | callable, default=”riemann”

Metric used for logarithmic map, can be: “euclid”, “logeuclid”, “riemann”, or a callable function.

Returns:
Tndarray, shape (…, n * (n + 1) / 2)

Tangent vectors.