pyriemann.utils.geodesic.geodesic_thompson

pyriemann.utils.geodesic.geodesic_thompson(A, B, alpha=0.5)

Thompson geodesic between SPD/HPD matrices.

The matrix at position \(\alpha\) on a possible Thompson geodesic between two SPD/HPD matrices \(\mathbf{A}\) and \(\mathbf{B}\) is given in [1].

\(\mathbf{C}\) is equal to \(\mathbf{A}\) if \(\alpha\) = 0, and \(\mathbf{B}\) if \(\alpha\) = 1.

Parameters:
Andarray, shape (…, n, n)

First SPD/HPD matrices.

Bndarray, shape (…, n, n)

Second SPD/HPD matrices.

alphafloat, default=0.5

Position on the geodesic.

Returns:
Cndarray, shape (…, n, n)

SPD/HPD matrices on the Thompson geodesic.

See also

geodesic

Notes

..versionadded:: 0.10

References

[1]

Differential geometry with extreme eigenvalues in the positive semidefinite cone C. Mostajeran, N. Da Costa, G. Van Goffrier and R. Sepulchre. SIAM Journal on Matrix Analysis and Applications, 2024