pyriemann.utils.tangentspace.tangent_space

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

Transform SPD matrices into tangent vectors.

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

Parameters
Xndarray, shape (…, n_channels, n_channels)

SPD matrices.

Crefndarray, shape (n_channels, n_channels)

The reference SPD matrix.

metricstring, default=’riemann’

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

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

Tangent vectors.