The best of two worlds: Decoding and source-reconstructing M/EEG oscillatory activity with a unique model
Britta U. Westner & Jean-Rémi King
This repository contains the simulation and analysis code for the project The best of two worlds: Decoding and source-reconstructing M/EEG oscillatory activity with a unique model.
This paper is soon available as a preprint.
The code in this repository is organized as follows:
project_settings.py
sensor_decoding.py
- runs one realization of sensor space decodingsource_decoding.py
- runs one realization of source space decodingdecoding_stats.py
- runs the whole simulation with 200 realizations, takessnr
as input, to be run in parallel for SNRsdecoding_stats_cv.py
- runs a grid search for optimal C parameter, 200 realizations, to be run in parallel for SNRs
real_data_faces.py
- analysis on thefaces
data set as shipped with MNE-Python
Figures 2, 4, and 5 as well as Tables 1 and 2 are generated using the Jupyter Notebooks in the subfolder jupyter
:
plotting_statistics_results.ipynb
- Fig. 2plotting_statistics_results_gridsearch.ipynb
- Fig. 4 and 5
Figure 3 is generated using the following code:
sensor_decoding.py
source_decoding.py
Figure 6 is generated using the real data analysis script:
real_data_faces.py
This work uses MNE-Python and scikit-learn.
It further relies on a library of functions that can be found under: https://github.com/britta-wstnr/python_code_base
For visualization, NiBabel and Matplotlib are used.