# pyriemann.utils.tangentspace.upper¶

pyriemann.utils.tangentspace.upper(X)

Return the weighted upper triangular part of matrices.

This function computes the minimal representation of a matrix in tangent space [1]: it keeps the upper triangular part of the symmetric/Hermitian matrix and vectorizes it by applying unity weight for diagonal elements and $$\sqrt{2}$$ weight for out-of-diagonal elements.

Parameters
Xndarray, shape (…, n, n)

Symmetric/Hermitian matrices.

Returns
Tndarray, shape (…, n * (n + 1) / 2)

Weighted upper triangular parts of symmetric/Hermitian matrices.

Notes

New in version 0.4.

References

1

Pedestrian detection via classification on Riemannian manifolds O. Tuzel, F. Porikli, and P. Meer. IEEE Transactions on Pattern Analysis and Machine Intelligence, Volume 30, Issue 10, October 2008.