MEEG time generalization


This exercise requires a separate dataset named meg-obj6; see download section. It also requires a working installation of FieldTrip.

Reading material

  • [KD14]: Description of the time generalization method.
  • [KOP16]: Paper using the time generalization method.

The time generalization method

Load the meg-obj6 data. Assign targets and chunks, then select only posterior gradiometer sensors in the time interval between 0 and 300 ms relative to stimulus onset. Then reduce the number of chunks to two (using cosmo chunkize) to get a train and test set. Use cosmo dim generalization measure for the time dimension, together with cosmo classify lda and cosmo crossvalidation measure to train for all time points in the 0-300 ms interval, and for each time point, test the classifier for each time point in the same interval. Display the resulting time-by-time classification accuracy matrix using imagesc

Template: run meeg time generalization skl

Check your answers here: run meeg time generalization / Matlab output: run_meeg_time_generalization