spd_learn.functional.exp_map_airm#
- spd_learn.functional.exp_map_airm(P, V, t=1.0)[source]#
Riemannian exponential map under the Affine-Invariant metric.
Maps a tangent vector \(V\) at base point \(P\) to a point on the SPD manifold by shooting along the geodesic in direction \(V\).
Under the Affine-Invariant Riemannian Metric (AIRM), the exponential map is:
\[\text{Exp}_P(tV) = P^{1/2} \exp(t P^{-1/2} V P^{-1/2}) P^{1/2}\]where \(\exp\) denotes the matrix exponential and \(V\) is a symmetric matrix representing a tangent vector at \(P\).
- Parameters:
P (torch.Tensor) – Base point on the SPD manifold with shape (…, n, n).
V (torch.Tensor) – Tangent vector at P (symmetric matrix) with shape (…, n, n).
t (float, optional) – Scaling factor for the tangent vector. Default is 1.0.
- Returns:
Point on the SPD manifold with shape (…, n, n).
- Return type:
Notes
The AIRM exponential map is a diffeomorphism from the tangent space at \(P\) to the entire SPD manifold, because the SPD manifold with AIRM forms a Hadamard manifold (complete, simply connected, nonpositive sectional curvature).
Examples
>>> import torch >>> from spd_learn.functional.metrics import exp_map_airm, log_map_airm >>> P = torch.eye(3) >>> V = 0.1 * torch.randn(3, 3) >>> V = (V + V.T) / 2 # Symmetrize >>> Q = exp_map_airm(P, V) # Shoot from P in direction V >>> V_back = log_map_airm(P, Q) # Should recover V >>> torch.allclose(V, V_back, atol=1e-5) True
See also
log_map_airm()Inverse operation (logarithmic map).
airm_geodesic()Geodesic interpolation.
airm_distance()Geodesic distance.
References
See [Pennec et al., 2006] for more details.