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 as in Section 3.4 of [1]:

\[\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

Added in version 0.4.

References

[1]

A Riemannian Framework for Tensor Computing X. Pennec, P. Fillard, N. Ayache. IJCV, 2006, 66(1), pp. 41-66.