spd_learn.functional.frechet_derivative_log#

spd_learn.functional.frechet_derivative_log(P, V)[source]#

Frechet derivative of the matrix logarithm at P in direction V.

Computes \(D\log(P)[V]\), the directional derivative of the matrix logarithm at SPD matrix \(P\) in direction \(V\). Delegates to pyriemann.geometry.base.ddlogm(), which evaluates the Daleckii-Krein (Loewner divided-difference) form on the Array API backend.

Parameters:
  • P (torch.Tensor) – SPD matrix, shape (…, n, n).

  • V (torch.Tensor) – Symmetric matrix (tangent vector), shape (…, n, n).

Returns:

The Frechet derivative \(D\log(P)[V]\), shape (…, n, n).

Return type:

torch.Tensor