spd_learn.functional.tangent_space#

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

Transform matrices into tangent vectors.

Transform matrices into tangent vectors, according to a reference matrix Cref and to a specific 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.

Returns:

T – Tangent vectors.

Return type:

ndarray, shape (…, n * (n + 1) / 2)

Notes

Changed in version 0.12.

See also

log_map, upper