pyriemann.utils.tangentspace.log_map_wasserstein¶
- pyriemann.utils.tangentspace.log_map_wasserstein(X, Cref)¶
Project matrices in tangent space by Wasserstein logarithmic map.
The projection of a matrix \(\mathbf{X}\) from SPD/HPD manifold to tangent space by the Wasserstein logarithmic map according to a SPD/HPD reference matrix \(\mathbf{C}_\text{ref}\) is given in Proposition 9 of [1]:
\[\mathbf{X}_\text{new} = (\mathbf{X}\mathbf{C}_\text{ref})^{1/2} + (\mathbf{C}_\text{ref}\mathbf{X})^{1/2} - 2\mathbf{C}_\text{ref}\]- Parameters:
- Xndarray, shape (…, n, n)
Matrices in SPD/HPD manifold.
- Crefndarray, shape (n, n)
Reference SPD/HPD matrix.
- Returns:
- X_newndarray, shape (…, n, n)
Matrices projected in tangent space.
Notes
Added in version 0.8.
References
[1]Wasserstein Riemannian geometry of Gaussian densities L. Malagò, L. Montrucchio, G. Pistone. Information Geometry, 2018, 1, pp. 137–179.