pyriemann.geometry.tangentspace.transport_wasserstein¶
- pyriemann.geometry.tangentspace.transport_wasserstein(X, A, B, n_steps=50)[source]¶
Parallel transport for Wasserstein metric.
The parallel transport of matrices \(\mathbf{X}\) in tangent space from an initial SPD/HPD matrix \(\mathbf{A}\) to a final SPD/HPD matrix \(\mathbf{B}\) according to the Levi-Civita connection of the Bures-Wasserstein metric, described in Section 7.5 of [1].
Bures-Wasserstein parallel transport is defined by a linear ordinary differential equation along the Wasserstein geodesic [1], integrated here with a fixed-step Runge-Kutta scheme of order 4. When \(\mathbf{A}\) and \(\mathbf{B}\) commute, a closed form is available [2].
Warning: this function must be applied to matrices \(\mathbf{X}\) already projected in tangent space with a logarithmic map at \(\mathbf{A}\), not to SPD/HPD matrices in manifold.
- Parameters:
- Xndarray, shape (…, n, n)
Symmetric/Hermitian matrices in tangent space at A.
- Andarray, shape (n, n)
Initial SPD/HPD matrix.
- Bndarray, shape (n, n)
Final SPD/HPD matrix.
- n_stepsint, default=50
Number of Runge-Kutta steps used to integrate the transport equation. Must be a positive integer. More steps are needed the further the transport map between A and B is from identity, at a cost linear in
n_steps.
- Returns:
- X_newndarray, shape (…, n, n)
Matrices in tangent space transported from A to B.
See also
Notes
Added in version 0.13.
References
[1] (1,2)Wasserstein Riemannian geometry of Gaussian densities L. Malagò, L. Montrucchio, G. Pistone. Information Geometry, 2018, 1, pp. 137–179.
[2]O(n)-invariant Riemannian metrics on SPD matrices Y. Thanwerdas & X. Pennec. Linear Algebra and its Applications, 2023.