Skip to content

Prepare your data: Dataset structure and format

David López-García edited this page Oct 19, 2021 · 7 revisions

Prepare your data

MVPAlab is designed to read and work with epoched data from two of the most employed preprocessing toolboxes: EEGLAB and FieldTrip. For a correct operation of MVPAlab Toolbox, epoched data should be previously saved on one independent file for each subject and condition using .mat format.

mvpalab-folder

EEGLAB data:

EEGlab format .set is also supported. If EEGlab was used for the data preprocessing, users should save the entire EEG structure for each participant, not only the EEG.data matrix. MVPAlab collects additional information from the data file, such as sampling frequency EEG.srate, the location of the electrodes EEG.chanlocs or data time points EEG.times.

Fieldtrip data:

In the same way, if FieldTrip is used, users must save the entire data structure, as MVPAlab reads the required subject’s data from data.trial, data.time and data.fsample.

MVPAlab standard data format:

Finally, if you do not use EEGlab or Fieldtrip, your epoched M/EEG data can also be easily adapted to a standard MVPAlab format. As mention before, the epoched data should be saved on independent file for each subject and condition. Each file should contain a MATLAB data struct including the following fields:

input.data
input.times
input.fs
input.format

mvpalab-format


  • The field input.data should contain a data matrix [electrodes x timepoints x trials] with the epoched data.
  • A time vector [1 x timepoints] indicating the exact timing of each data sample should be included in input.times. If this time vector is not specified, the MVPAlab Toolbox automatically generates a consecutive number vector from one to the total number of samples.
  • The sampling frequency of the original dataset is also required and must be indicated in the input.fs field.
  • Finally, you must indicate that the standard format is used for your data: input.format = 'mvpalab'.


Note: For the moment, the MVPAlab Toolbox only supports the EEGlab format for electrode layout.

Clone this wiki locally