[Eeglablist] ICA on continuous v. epoched data?

Grega Repovs grega.repovs at psy.ff.uni-lj.si
Sun Jan 30 01:12:13 PST 2011


Dear Andrew,

The purpose of using ICA (as most are using it in EEG community) is not to get separate ICA solutions (different weights) for each trial types, but rather to "reshuffle" the original EEG channels, where each channel carries signal mixed from different sources, to new virtual channels (components), where each component estimates the unmixed signal of (idealy) a single source. This can then be used to compare responses from individual sources between conditions (using the same solution).

Imagine a band playing a number of pieces during a gig at the local pub and somebody places a number of microphones in various places in the pub. After recording, each micophone's channel will have recorded all the instruments but to somewhat different degrees. Using ICA you can unmix the instruments, creating virtual channels (components) that will now carry signal from an individual instrument. And once you do that, you can compare the recording at different times to see to what extent the bass was involved in the first piece and what saxophone was doing in the last.

The assumption of course is, that the band has not changed positions during the recording and that the instruments did not switch places. In the brain the "instruments" do not change places, however in different pieces different "instruments" might come on- or off-line. If the cognitive task that you are observing requires substantially different processing that would involve completely different sources in different task conditions, then you can either hope that a) the number of channels that you are estimating suffices to capture all the key different sources that are present in different conditions - some will be present in condition A and absent in B others the other way around - (this is the way most people would go about it), or b) do separate ICA on each trial type.

If you would go for b) you could then compare the two solutions, the topographies of identified components, and possibly find a component that was present in condition A but absent in B. You could further look at the ERPs of such components in their respective trial types, to see, in what phases of (that specific) task the component is involved. You could not however directly compare the ERP of (for example) the first component in condition A vs. the first component in condition B as the two components (most probably) correspond to different sources. It would be like comparing  the playing of the guitar from Thursday's session of the Amygdaloids with the trombone from Friday's gig by the Precuneuist. 

To be able to compare component signals from two different ICA decompositions, you would first need to find the matching components, possibly by looking at the correlation between their demixing vectors. This is a problem that is being explored and addressed in fMRI literature when addressing the question of how to combine the ICA solutions from different subjects to get valid group results.

To get back to the original issue, when doing cognitive tasks, we are most often interested in exploring only very slight differences in task conditions. In this cases we can (rather) safely assume that the composition of sources will not change dramatically between the conditions, that the same components will be involved in all conditions to somewhat different degrees, and that there will be only very few sources that would be online in some conditions and completely offline in others. Given that, the best strategy seems to be to go for one ICA solution for the whole recording and then compare the involvement of the identified components between conditions.

Ending this rather longwinded discussion with myself, I hope it is of help in answering your question.

All the best,

Grega


On 27 Jan 2011, at 19:21, Andrew Hill <andrewhill at ucla.edu> wrote:

> Still trying to get some clarification here...  If I epoch continuous files that have ICA weights calculated, and I epoch by different event/condition types.. how can I view the ICA results that only apply to specific epoch types, since it appears that all the ICA weights are preserved from a continuous file to specific epochs.
> 
> Thanks,
> Andrew
> 
> On Jan 14, 2011, at 1:16 PM, Andrew Hill wrote:
> 
>> Hi Arno,
>> 
>> Thanks.. but how do I view ICA maps that only apply to specific epoch types/conditions?
>> 
>> Best,
>> Andrew
>> 
>> On Jan 14, 2011, at 9:15 AM, Arnaud Delorme wrote:
>> 
>>> Dear Andrew,
>>> 
>>> this is fine. The ICA scalp maps are spatial filters. If you epoch the data  they are preserved.
>>> Best,
>>> 
>>> Arno
>>> 
>>> On Jan 12, 2011, at 11:23 PM, Andrew Hill wrote:
>>> 
>>>> Hi folks,
>>>> 
>>>> A point of clarification needed, if someone has a moment.  
>>>> 
>>>> I'm running ICA against continuous data and then epoching the data per event codes.  
>>>> 
>>>> Plotting (scroll) data for the resulting epoched EEG files does show that my .sets are "different", but plotting 2-D Component maps for two different epoch file sets (though within a specific subject and session) shows the exact same set of (64) component maps even though the .set files do show different EEG.
>>>> 
>>>> I've looked at both component maps (2-D) and the contents of EEG.icawinv for two specific epoched sets, and they are identical even though I am  looking at two different "condition" .sets in my data.
>>>> 
>>>> Below is the script that I've been using to import, filter, and epoch my data, but I'm just not sure how to proceed from here, since the components are not "different" across different conditions.  
>>>> 
>>>> Can someone else perhaps share with me their "workflow" for getting data from continuous recording to epoched, ICA weighted, set files from different conditions that are used in a study?  
>>>> 
>>>> I posted a few days ago about problems with interpolating electrodes/clustering on a study, but it seems I have a more basic problem to sort out first.
>>>> 
>>>> Thanks,
>>>> Andrew
>>>> 
>>>> for S = [101:140];  
>>>> 
>>>> [ALLEEG EEG CURRENTSET ALLCOM] = eeglab;
>>>> 
>>>> %set options
>>>> pop_editoptions( 'option_storedisk', 1, 'option_savetwofiles', 1, 'option_saveica', 1, 'option_single', 0, 'option_computeica', 1, 'option_scaleicarms', 1, 'option_rememberfolder', 1);
>>>> 
>>>> for SESS = [1,3];
>>>> 
>>>> %%%% Operations on .SET file.
>>>> % load a file
>>>> EEG = pop_loadset( 'filename', [int2str(S) '_ATTN_' int2str(SESS) '.set'], 'filepath', ['/Users/andrew/Documents/Research/DATA/BFBLANTSETS/BFBLANTSETS64_31ref/S' int2str(S)]);
>>>> 
>>>> EEG = eeg_checkset( EEG );
>>>> 
>>>> EEG=pop_chanedit(EEG, 'lookup','/Users/andrew/Documents/MATLAB/eeglab9_0_3_4b/plugins/dipfit2.2/standard_BESA/standard-10-5-cap385.elp','changefield',{65 'labels' 'A1'},'changefield',{66 'labels' 'A2'});
>>>> 
>>>> %drop empty channels from the .bdf
>>>> EEG = pop_select( EEG,'nochannel',{'EXG3' 'EXG4' 'EXG5' 'EXG6' 'EXG7' 'EXG8'});
>>>> 
>>>> EEG = eeg_checkset( EEG );
>>>> 
>>>> % remove any bad channels
>>>> EEG = pop_rejchan(EEG, 'elec',[1:66] ,'threshold',5,'norm','on','measure','kurt');
>>>> 
>>>> EEG = pop_runica(EEG, 'icatype','runica','dataset',1,'options',{'extended' 1});
>>>> 
>>>> % store the channel adjusted set in ALLEEG.  *row 20 used to allow up to 19 condition/trigger groups)
>>>> [ALLEEG, EEG, CURRENTSET] = eeg_store( ALLEEG, EEG, 20);
>>>> 
>>>> % Single-trigger coded epochs (trigger indicates unique combo of cue and target)
>>>> % Epoch using e (array size), Cond as name for several trigs for one Condidition
>>>> %%%%%extract 12 different types of epochs, set Subject/Condition metadata.
>>>> 
>>>> for e = [1:12];
>>>>      Cond =['LVF-ConTarg-CenCue'; 'LVF-ConTarg-ValCue'; 'LVF-ConTarg-InvCue'; 'LVF-IncTarg-CenCue'; 'LVF-IncTarg-ValCue'; 'LVF-IncTarg-InvCue'; 'RVF-ConTarg-CenCue'; 'RVF-ConTarg-ValCue'; 'RVF-ConTarg-InvCue'; 'RVF-IncTarg-CenCue';'RVF-IncTarg-ValCue';'RVF-IncTarg-InvCue'  ];
>>>> 
>>>>      trigs =[{'111'}; {'112'}; {'113'}; {'121'}; {'122'}; {'123'}; {'211'}; {'212'}; {'213'}; {'221'}; {'222'}; {'223'} ];   
>>>>  EEG = pop_epoch(EEG, trigs(e,:), [-.75 .95], 'newname', Cond(e,:) );
>>>> 
>>>>     % baseline filter using pre-cue interval.
>>>>     EEG = pop_rmbase( EEG, [-700  -450] );
>>>>     [ALLEEG, EEG, CURRENTSET] = eeg_store( ALLEEG, EEG, e );
>>>> 
>>>>     %get current Condition
>>>>     Current_Condition = Cond(e,:);
>>>> 
>>>>     %edit the dataset info
>>>>     EEG = pop_editset(EEG, 'subject', ['Subject_',int2str(S)], 'condition', Current_Condition, 'session', [int2str(SESS)]);
>>>> 
>>>>     %auto-reject epochs statistically.
>>>>     EEG = pop_autorej(EEG, 'nogui','on','eegplot','off');
>>>> 
>>>> % save a new set file for the extracted epochs
>>>>     EEG = pop_saveset( EEG,  'filename', [int2str(S) '_' Current_Condition '_ICA_' int2str(SESS),'.set'], 'filepath', ['/Users/andrew/Documents/Research/DATA/BFBLANTSETS/BFBLANTEPOCHSICA/S' int2str(S)]);
>>>> 
>>>>     % select the unepoched, re-referenced .SET file
>>>>     [EEG ALLEEG CURRENTSET] = eeg_retrieve(ALLEEG,20);
>>>> end
>>>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% end of epoching 
>>>> 
>>>> 
>>>>  ALLEEG = pop_delset( ALLEEG, [1:20] )
>>>> 
>>>>  end
>>>> 
>>>> end
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
>>>> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu
>>>> For digest mode, send an email with the subject "set digest mime" to eeglablist-request at sccn.ucsd.edu
>>> 
>> 
>> 
>> _______________________________________________
>> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
>> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu
>> For digest mode, send an email with the subject "set digest mime" to eeglablist-request at sccn.ucsd.edu
> 
> 
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to eeglablist-request at sccn.ucsd.edu
> 




More information about the eeglablist mailing list