spd_learn.functional.log_map#

spd_learn.functional.log_map(X, Cref, *, metric='riemann', **kwargs)[source]#

Project matrices in tangent space by logarithmic map.

Parameters:
  • X (ndarray, shape (..., n, n)) – Matrices in manifold.

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

  • metric (string | callable, default="riemann") – Metric used for logarithmic map, can be: “euclid”, “logchol”, “logeuclid”, “riemann”, “wasserstein”, or a callable function.

  • **kwargs (dict) –

    The keyword arguments passed to the sub function.

    Added in version 0.12.

Returns:

X_new – Matrices projected in tangent space.

Return type:

ndarray, shape (…, n, n)

Notes

Added in version 0.9.

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