There is a newer version of the record available.

Published October 17, 2021 | Version v0.1

Software: covmatest

Authors/Creators

Description

Release notes

This software implements a simple method to get semi-definite positive (SPD) covariance matrices for testing. A possible use case is the use of such software for testing electroencephalography (EEG) or magnetoencephalography (MEG) classification pipeline based on covariance matrices and Riemannian geometry.  

Samples are real EEG recordings of participants during an opened/closed eye experiment [1]. The implementation takes as parameters the expected number of matrices and channels and returns a random set of samples from the experiment. The number of channels has to be between 1 and 16. Covariance matrices are estimated using pyRiemann [2].

Usage

The software can be installed using pip:

pip install covmattest

And the following code generates 3 matrices of size 2x2:

covmat = get_covmat(3, 2)

By default, matrices are issued from the same subject, picked randomly at the initialization of the script. To enforce the choice of a new random subject, you can use the following code:

from covmatest import CovmatGen
gen = CovmatGen()

covmat = gen.get_covmat(3, 2)

Note that each instance of CovmatGen picks a subject randomly and then keeps it during the whole time of its lifecycle.

References

[1]  G. Cattan, P. L. Coelho Rodrigues, and M. Congedo, ‘EEG Alpha Waves Dataset’, GIPSA-LAB, Research Report, décembre 2018. [Online]. Available: https://hal.archives-ouvertes.fr/hal-02086581

[2] A. Barachant, pyRiemann. pyRiemann, 2015. [Online]. Available: https://github.com/pyRiemann/pyRiemann

Files

gcattan/covmatest-v0.1.zip

Files (11.3 kB)

Name Size
md5:a9c0d0b23de35c6acaec98f5c07a64f9
11.3 kB Preview Download

Additional details

Related works

References