pyriemann.utils.tangentspace.log_map_logeuclid

pyriemann.utils.tangentspace.log_map_logeuclid(X, Cref)

Project matrices in tangent space by log-Euclidean logarithmic map.

The projection of a matrix \(\mathbf{X}\) from SPD/HPD manifold to tangent space by log-Euclidean logarithmic map according to a SPD/HPD reference matrix \(\mathbf{C}_\text{ref}\) as described in Eq.(3.4) of [1]:

\[\mathbf{X}_\text{new} = [D_{\log(\mathbf{C}_\text{ref})} \exp] \left( \log(\mathbf{X}) - \log(\mathbf{C}_\text{ref}) \right)\]

where \([D_{\log(\mathbf{C}_\text{ref})} \exp]\left(\mathbf{X}\right)\) indicates the differential of the matrix exponential at point \(\log(\mathbf{C}_\text{ref})\) applied to \(\mathbf{X}\). Calculation is performed according to Eq. (7) in [2].

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

Matrices in SPD/HPD manifold.

Crefndarray, shape (n, n)

Reference SPD matrix.

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

Matrices projected in tangent space.

Notes

Added in version 0.4.

References

[1]

Geometric Means in a Novel Vector Space Structure on Symmetric Positive‐Definite Matrices V. Arsigny, P. Fillard, X. Pennec, N. Ayache. SIMAX, 2006, 29(1), pp. 328-347.

[2]

A New Canonical Log-Euclidean Kernel for Symmetric Positive Definite Matrices for EEG Analysis G. Wagner vom Berg, V. Röhr, D. Platt, B. Blankertz. IEEE TBME, 2024.