[FieldTrip] Question about MVPA topographic map

D.Abdallah da401 at kent.ac.uk
Thu Sep 7 13:53:20 CEST 2017


Dear all,



I've had a bit of trouble understanding the results that I get when using the ft_topoplotER.

I have run on matlab R2014a the MVPA tutorial on fieldtrip: http://www.fieldtriptoolbox.org/tutorial/multivariateanalysis and tried to understand the resulting topographic map but wasn't able to because there is no proper legend that explains where the x and y axes are and they represent.



The experiment that my supervisor and I conducted is meant to look at the pattern of activity in the brain (using EEG) in a switch vs. non-switch task of Rubin's Face-Vase ambiguous stimulus. In order to study that we are using MVPA.



This is the code we are running on one of the subjects that we collected:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%PREPROCESSING

%Reading the data

cfg = [];

cfg.dataset = filename1;

cfg.reref = 'yes';

cfg.channel = {'Cz', 'PO9', 'PO7', 'PO3', 'PO', 'PO4', 'PO8' 'PO10', 'O1', 'Oz', 'O2','O9', 'O10'};

cfg.refchannel = 'Cz';

cfg.demean = 'yes';

data_eeg1 = ft_preprocessing(cfg);

%Segmenting data

cfg.trialdef.eventtype = '?';

Dummy = ft_definetrial(cfg);

cfg.trialdef.prestim = 0.1;

cfg.trialdef.poststim = 0.6;

cfg.baselinewindow = [-0.1 0];

cfg.trialdef.eventtype = 'STATUS';

cfg.trialdef.eventvalue = [100];

stimulusTrigger = ft_definetrial(cfg);

cfg.trialdef.eventvalue = [1];

FaceTrials = ft_definetrial(cfg);

cfg.trialdef.eventvalue = [2];

VaseTrials = ft_definetrial(cfg);

%Definitions of Triggers

stimulusTrigger = 100;

faceResponseTrigger = 1;

vaseResponseTrigger = 2;

%Define Face Trials and Conduct Preprocessing

[trlFaces, eventFaces] = ft_trialfun_BasedOnResp(FaceTrials,stimulusTrigger,faceResponseTrigger);

hdr = ft_read_header(cfg.dataset);

event = ft_read_event(cfg.dataset);

FaceData = ft_preprocessing(FaceTrials);

FaceTrigger = [eventFaces(strcmp(cfg.trialdef.eventtype, {eventFaces.type})).value]';

FaceSample = [eventFaces(strcmp(cfg.trialdef.eventtype, {eventFaces.type})).sample]';

Facepretrig = -round(cfg.trialdef.prestim * hdr.Fs);

Faceposttrig = round(cfg.trialdef.poststim * hdr.Fs);

%Define Vase Trials and Conduct Preprocessing

[trlVase, eventVase] = ft_trialfun_BasedOnResp(VaseTrials,stimulusTrigger,vaseResponseTrigger);

hdr = ft_read_header(cfg.dataset);

event = ft_read_event(cfg.dataset);

VaseData = ft_preprocessing(VaseTrials);

VaseTrigger = [eventVase(strcmp(cfg.trialdef.eventtype, {eventVase.type})).value]';

Vasesample = [eventVase(strcmp(cfg.trialdef.eventtype, {eventVase.type})).sample]';

Vasepretrig = -round(cfg.trialdef.prestim * hdr.Fs);

Vaseposttrig = round(cfg.trialdef.poststim * hdr.Fs);

%Calculate Face ERP

FaceTrials.reref = 'no';

FaceTrials.keeptrials = 'yes'; % classifiers operate on individual trials

FaceTrials.channel = {'PO9', 'PO7', 'PO3', 'PO', 'PO4', 'PO8' 'PO10', 'O1', 'Oz', 'O2','O9', 'O10'}; % occipital channels only

FaceERP = ft_timelockanalysis(FaceTrials,FaceData);

%Calculate Vase ERP

VaseTrials.reref = 'no';

VaseTrials.keeptrials = 'yes'; % classifiers operate on individual trials

VaseTrials.channel = {'PO9', 'PO7', 'PO3', 'PO', 'PO4', 'PO8' 'PO10', 'O1', 'Oz', 'O2','O9', 'O10'}; % occipital channels only

VaseERP = ft_timelockanalysis(VaseTrials,VaseData);

%MVPA

cfg.layout = 'biosemi64.lay';

cfg.method = 'crossvalidate';

cfg.design = [ones(size(FaceERP.trial,1),1); 2*ones(size(VaseERP.trial,1),1)];

cfg.nfolds = 4;

cfg.latency = [-0.1 0.6];

cfg.statistic = {'accuracy' 'binomial' 'contingency'};

stat = ft_timelockstatistics (cfg, FaceERP,VaseERP);

stat.statistic.contingency

%Plot MVPA Results

stat.mymodel = stat.model{2}.primal;

cfg.parameter = 'mymodel';

cfg.xlim = [-0.1 0.6];

cfg.comments = '';

cfg.colorbar = 'yes';

cfg.interplimits= 'electrodes';

ft_topoplotER(cfg,stat);



Attached is the resulting topographic map. We found a very weird pattern that doesn't seem to show what we are expecting. It seems as though there might be a glitch or a step we missed.

We came to the conclusion after running figure(imagesc(stat.mymodel)) in order to understand the topographical map and found a completely different pattern (see second attached Imagesc subject 8 file).

Why are the patterns very different?



Moreover, when we ran the MVPA fieldtrip tutorial, the topographical map showed a proper pattern of activity (see tutorial topographic map).



All the best,

Diane Abdallah


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170907/0995518f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Subject 8 Topographical map.fig
Type: application/octet-stream
Size: 450612 bytes
Desc: Subject 8 Topographical map.fig
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170907/0995518f/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Imagesc Subject 8.fig
Type: application/octet-stream
Size: 40249 bytes
Desc: Imagesc Subject 8.fig
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170907/0995518f/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tutorial topographic map.png
Type: image/png
Size: 10419 bytes
Desc: tutorial topographic map.png
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170907/0995518f/attachment-0001.png>


More information about the fieldtrip mailing list