pyriemann.utils.tangentspace.upper

pyriemann.utils.tangentspace.upper(X)

Return the weighted upper triangular part of symmetric matrices.

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

Parameters
Xndarray, shape (…, n_channels, n_channels)

Symmetric matrices.

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

Weighted upper triangular parts of symmetric matrices.

Notes

New in version 0.3.1.

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.