pyriemann.utils.tangentspace.log_map_riemann

pyriemann.utils.tangentspace.log_map_riemann(X, Cref, C12=False)

Project matrices in tangent space by Riemannian logarithmic map.

The projection of a matrix \(\mathbf{X}\) from SPD/HPD manifold to tangent space by Riemannian logarithmic map according to a SPD/HPD reference matrix \(\mathbf{C}_\text{ref}\) is:

\[\mathbf{X}_\text{new} = \log ( \mathbf{C}_\text{ref}^{-1/2} \mathbf{X} \mathbf{C}_\text{ref}^{-1/2})\]

When C12=True, it returns the full Riemannian logarithmic map:

\[\mathbf{X}_\text{new} = \mathbf{C}_\text{ref}^{1/2} \log( \mathbf{C}_\text{ref}^{-1/2} \mathbf{X} \mathbf{C}_\text{ref}^{-1/2}) \mathbf{C}_\text{ref}^{1/2}\]
Parameters:
Xndarray, shape (…, n, n)

Matrices in SPD/HPD manifold.

Crefndarray, shape (n, n)

Reference SPD/HPD matrix.

C12bool, default=False

If True, it returns the full Riemannian logarithmic map.

Returns:
X_newndarray, shape (…, n, n)

Matrices projected in tangent space.

Notes

New in version 0.4.