Skip to content
No description, website, or topics provided.
Python R Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
library
outputs
LICENSE
Makefile
README.md
compute_scores_models_fieldtrip_spoc_example.py
config.py
config.r
nimg_simuls_compute_distance_linearpower.py
nimg_simuls_compute_distance_loglinearpower.py
nimg_simuls_compute_individual_A_linearpower.py
nimg_simuls_compute_individual_A_loglinearpower.py
nimg_simuls_compute_snr_linearpower.py
nimg_simuls_compute_snr_loglinearpower.py
nimg_simuls_plot_distance.r
nimg_simuls_plot_individual_A.r
nimg_simuls_plot_snr.r
plot_figure_camcan_model_comp.r
plot_figure_error_decomposition.r
plot_figure_fieldtrip_results_intervals.r
plot_figure_preproc_impact.r

README.md

Regression with covariance matrices

This is the Python code for the NIMG 2019 submitted article Predictive regression modeling with MEG/EEG: from source power to signals and cognitive states

  • make clean: clean the repo

  • make simu: compute & plot results of simulations (Fig.3)

  • make fieldtrip: compute & plot results of FieldTrip experiment (Fig.4)

  • make camcan: compute & plot results of Cam-CAN experiment (Fig.5)

  • make error_decompo: compute & plot results of error decomposition experiment (Fig.6)

  • make preproc: compute & plot results of pre-processing impact (Fig.7)

Dependencies

Configuration file

  • config.py defines global PATH variables PATH_OUTPUTS that should point to output directory and PATH_DIR to Cam-CAN input data

Libraries

  • /library/preprocessing.py contains the code used to preprocess raw data from CamCAN

  • /library/spfiltering.py contains the functions to implement spatial filtering of the covariance matrices

  • /library/featuring.py contains all the functions to vectorize the covariance matrices

  • /library/simuls: contains the function to generate covariance matrices following the generative model of the paper

  • /library/utils.py contains the other vectorization methods

Simulations

  • nimg_simuls_compute_xx.py: scripts generating MAE scores for the 3 simulations of the paper

Input: None

Output: PATH_OUTPUTS/simuls/xx/yy.csv

  • nimg_simuls_plot_xx.r are the corresponding plotting scripts (in R)

Input: PATH_OUTPUTS/simuls/xx/yy.csv

Output: Fig. 3 of paper

FieldTrip experiment

  • compute_scores_models_fieldtrip_spoc_example.py: scripts generating R2 scores for the FielTrip experiment

Input: None

Output: PATH_OUTPUTS/all_scores_models_fieldtrip_spoc_r2.npy, PATH_OUTPUTS/fieldtrip_component_scores.csv

  • plot_figure_fieldtrip_results_intervals.r: corresponding plotting script (in R)

Input: PATH_OUTPUTS/all_scores_models_fieldtrip_spoc_r2.npy, PATH_OUTPUTS/fieldtrip_component_scores.csv

Output: PATH_OUTPUTS/fig_fieldtrip_component_selection.pdf, PATH_OUPTUTS/fig_fieldtrip_model_comp.pdf (Fig.4 of paper)

You can’t perform that action at this time.