spd_learn.functional.log_map_lsm#

spd_learn.functional.log_map_lsm(C: Tensor, max_iter: int = 10, tol: float = 1e-06) → Tensor[source]#

Log-Scaled Metric (LSM) logarithmic map [Hu et al., 2025].

Scales correlation matrix \(C \in \mathcal{C}_{++}^n\) via diagonal \(D = \text{diag}(d)\) such that \(\text{diag}(\log(D C D)) = 0\).

Parameters:
  • C (torch.Tensor) – Correlation matrices of shape (…, n, n).

  • max_iter (int, default=10) – Maximum number of scaling iterations.

  • tol (float, default=1e-6) – Convergence tolerance on the diagonal elements of the logarithm.

Returns:

Hollow symmetric tangent matrix of shape (…, n, n).

Return type:

torch.Tensor