JakeLmp / SpeechAdaptation

0 stars 0 forks source link

Repository for EEG MVPA pipelines

Time-Generalized MVPA (decoding), like in

And other approaches, like in

Written with MNE-Python and scikit-learn. Mainly intended for use with EEG data, could relatively easily be adapted to other data.

NOTE: at the time of writing (December 2023), packages have not been updated to account for the release of Python 3.12. All development and testing was done in Python 3.11.7 and the accompanying versions of third-party packages such as MNE.

MVPA data format requirements

See MNE import documentation for BrainVision files

Files provided to the tool should contain:

Installation

The repository can be downloaded and unpacked as a .zip file, or using

git clone git@github.com:JakeLmp/SpeechAdaptation.git

and following the subsequent steps. Required third-party Python packages can be installed using

pip install -r requirements.txt

after setting the current working directory to the downloaded repository.

How to run

  1. Open the package's PARAMETERS.toml file, edit the parameter values to your liking, and save the file.
  2. Set the repository as the current working directory.
  3. Run the following command in the terminal:
python -m MVPA
  1. Inspect the ERP plots (located in the results/plot directory) to see if data preprocessing was performed according to expectations, and wait for the tool to complete.

Results are stored in (subdirectories of) the user-specified directory.

For more options running the tool, type

python -m MVPA --help

to print usage instructions.

Plotting

Plots of the results are automatically generated and stored in the results/plot directory. You may want to explore the data further using other plotting parameters. Examples on how to use the included plotting functions are included in the plotting_expamples.ipynb notebook.