pyriemann.utils.tangentspace.exp_map_riemann

pyriemann.utils.tangentspace.exp_map_riemann(X, Cref, Cm12=False)

Project matrices back to SPD manifold by Riemannian exponential map.

The projection of a matrix X back to the SPD manifold with Riemannian exponential map according to a reference matrix \(\mathbf{C}_\text{ref}\) is:

\[\mathbf{X}_\text{original} = \mathbf{C}_\text{ref}^{1/2} \exp(\mathbf{X}) \mathbf{C}_\text{ref}^{1/2}\]

When Cm12=True, it returns the full Riemannian exponential map:

\[\mathbf{X}_\text{original} = \mathbf{C}_\text{ref}^{1/2} \exp( \mathbf{C}_\text{ref}^{-1/2} \mathbf{X} \mathbf{C}_\text{ref}^{-1/2}) \mathbf{C}_\text{ref}^{1/2}\]
Parameters
Xndarray, shape (…, n_channels, n_channels)

Matrices in tangent space.

Crefndarray, shape (n_channels, n_channels)

The reference SPD matrix.

Cm12bool, default=False

If True, it returns the full Riemannian exponential map.

Returns
X_originalndarray, shape (…, n_channels, n_channels)

SPD matrices.

Notes

New in version 0.3.1.