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