spd_learn.functional.log_map_euclid#

spd_learn.functional.log_map_euclid(X, Cref, **kwargs)[source]#

Project matrices in tangent space by Euclidean logarithmic map.

The projection of a matrix \(\mathbf{X}\) from manifold to tangent space by Euclidean logarithmic map according to a reference matrix \(\mathbf{C}_\text{ref}\) is:

\[\mathbf{X}_\text{new} = \mathbf{X} - \mathbf{C}_\text{ref}\]
Parameters:
  • X (ndarray, shape (..., n, m)) – Matrices in manifold.

  • Cref (ndarray, shape (n, m)) – Reference matrix.

Returns:

X_new – Matrices projected in tangent space.

Return type:

ndarray, shape (…, n, m)

Notes

Added in version 0.4.

Changed in version 0.12: Add support for NumPy and PyTorch.