spd_learn.functional.log_map_wasserstein#
- spd_learn.functional.log_map_wasserstein(X, Cref, **kwargs)[source]#
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:
X (ndarray, shape (..., n, n)) – Matrices in SPD/HPD manifold.
Cref (ndarray, shape (n, n)) – Reference SPD/HPD matrix.
- Returns:
X_new – Matrices projected in tangent space.
- Return type:
ndarray, shape (…, n, n)
Notes
Added in version 0.8.
Changed in version 0.12: Add support for NumPy and PyTorch.
References
[1]Wasserstein Riemannian geometry of Gaussian densities L. Malagò, L. Montrucchio, G. Pistone. Information Geometry, 2018, 1, pp. 137–179.