spd_learn.functional.transport#

spd_learn.functional.transport(X, A, B, metric='riemann')[source]#

Parallel transport according to a specified metric.

Parallel transport of matrices \(\mathbf{X}\) in tangent space from an initial SPD/HPD matrix \(\mathbf{A}\) to a final SPD/HPD matrix \(\mathbf{B}\), according to a metric.

Warning: this function must be applied to matrices \(\mathbf{X}\) already projected in tangent space with a logarithmic map at \(\mathbf{A}\), not to SPD/HPD matrices in manifold.

Parameters:
  • X (ndarray, shape (..., n, n)) – Matrices in tangent space at A.

  • A (ndarray, shape (n, n)) – Initial SPD/HPD matrix.

  • B (ndarray, shape (n, n)) – Final SPD/HPD matrix.

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

Returns:

X_new – Matrices in tangent space transported from A to B.

Return type:

ndarray, shape (…, n, n)

Notes

Added in version 0.10.

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