spd_learn.functional.geodesic_logchol#
- spd_learn.functional.geodesic_logchol(A, B, alpha=0.5)[source]#
Log-Cholesky geodesic between SPD/HPD matrices.
The matrix at position \(\alpha\) on the log-Cholesky geodesic between two SPD/HPD matrices \(\mathbf{A}\) and \(\mathbf{B}\) is:
- Parameters:
A (ndarray, shape (..., n, n)) – First SPD/HPD matrices.
B (ndarray, shape (..., n, n)) – Second SPD/HPD matrices.
alpha (float | ndarray, shape (...,), default=0.5) –
Position on the geodesic. If ndarray, one value per matrix pair.
Changed in version 0.12.
- Returns:
C – SPD/HPD matrices on the log-Cholesky geodesic.
- Return type:
ndarray, shape (…, n, n)
Notes
Added in version 0.7.
Changed in version 0.12: Add support for NumPy and PyTorch. Add support for array-valued alpha.
See also
References
[1]Riemannian geometry of symmetric positive definite matrices via Cholesky decomposition Z. Lin. SIAM J Matrix Anal Appl, 2019, 40(4), pp. 1353-1370.