[Eeglablist] injecting ICA weights from one dataset to another

Andreas Widmann widmann at uni-leipzig.de
Fri May 26 03:12:30 PDT 2017


Hi Jose,

> I went to back to my pipeline.
> When I did ICA I set the rank to: all channels minus 3 (-1 due to the average reference and -2 due to both EOG channels)
One cannot "set" the rank. The rank is an inherent property of the data. What is the problem with your EOG channels? Most commonly it is recommended to include the EOG channels into ICA.

>     EEG = pop_runica(EEG, 'icatype', 'runica', 'extended', 1,'interupt', 'on','chanind', [1:EEG.nbchan-3]);
Using the 'chanind' option you define which channels should be included into the computation of the ICA decomposition. Thus, you excluded the last three channels from the decomposition. Why? You cannot apply the resulting decomposition to a dataset including these three channels. If you assume or know that your data are rank reduced you may use the 'pca' option of runica to reduce the dimensionality of the data. Excluding channels will not help.

Hope this helps! Best,
Andreas

> So, for a given subject the dimensions for the icachansind, icasphere, and icaweights variables were 1x63, 63x63 and 43x63 (so 66 [64 EEG channels + 2 EOG channels] -3). However, for this same subject the number of channels for the unfiltered dataset is 66. I think this is inconsistency is screwing up my data, however I don't know how this should be done to overcome my problem,
> Am 25.05.2017 um 15:22 schrieb José Luis <joseluisulloafulgeri at gmail.com>:
> 
> dear community,
> 
> I'm performing analysis of EEG data, which I want to explore for ERP and TF analysis. I aimed at performing two separated analyses, one with filtered data (for ERPs) and another with unfiltered data (for TF, also because I want to see high frequency oscillations),
> 
> I applied ICA to the filtered data to get ride of ocular and other artifacts. Next, I wanted to inject the weights of the ICA into the unfiltered data. Unfortunately I didn't find too much documentation about this, so I hope this will be useful for other users that want to do this (if there is any documentation please let me know).
> 
> What I did was the following:
> 1) In a first step I eliminated the bad components of my filtered data so I get an ICA-pruned dataset,
> 2) Next, I save the ICA variables from my ICA-pruned data set,
>     icachansind = EEG.icachansind;
>     icasphere = EEG.icasphere;
>     icaweights = EEG.icaweights;
> 3) Next, I load my unfiltered data. I make sure any bad channel that need to be removed was removed, and that the data was re-referenced to the average reference. I'm not certain that the average reference is very important, but regarding the bad channels I know that if I inject ICA weights from another dataset they need to have the same number of channels, so if I remove one channel when I perform ICA on the filtered data I need to remove one channel in the unfiltered data to apply the ICA weights. Next, I load the mat files that I save in step 2, and I edit the unfiltered dataset with:
>     EEG = pop_editset(EEG, 'icachansind', 'icachansind', 'icaweights', 'icaweights', 'icasphere', 'icasphere');
>     EEG = eeg_checkset(EEG);
> to integrate the ICA information in the unfiltered dataset. Next, I sort of apply the ICA decomposition with:
>     EEG = pop_subcomp(EEG, [ ], 0);
>     EEG = eeg_checkset(EEG);
> and this certainly eliminate the ocular movements of my unfiletered dataset,
> 4) Next, I interpolated if this is necessary with;
>     EEG = pop_interp(EEG, orichannels, 'spherical');
>     EEG = eeg_checkset(EEG);
> the orichannels correspond to the orginal arrangement of the EEG channels, and this works well to interpolate when there is a missing channel in the dataset,
> 5) Next, I re-reference to the average reference
>     EEG = pop_reref(EEG, [ ],'exclude', [65 66]);
>     EEG = eeg_checkset(EEG);
>     
> While all looks like it was working good, I noted that my unfiltered dataset was drastically changed. For some channels the amplitude of the signal was really diminished and looked like it was flat, but actually was just really diminished.
> 
> I went to back to my pipeline.
> When I did ICA I set the rank to: all channels minus 3 (-1 due to the average reference and -2 due to both EOG channels)
>     EEG = pop_runica(EEG, 'icatype', 'runica', 'extended', 1,'interupt', 'on','chanind', [1:EEG.nbchan-3]);
> 
> So, for a given subject the dimensions for the icachansind, icasphere, and icaweights variables were 1x63, 63x63 and 43x63 (so 66 [64 EEG channels + 2 EOG channels] -3). However, for this same subject the number of channels for the unfiltered dataset is 66. I think this is inconsistency is screwing up my data, however I don't know how this should be done to overcome my problem,
> 
> I find a message in the eeglab list about this but the procedure is not clear to me https://sccn.ucsd.edu/pipermail/eeglablist/2013/006294.html
> 
> I hope the description is good enough to show what my problem is,
> 
> Any directions about this will be really appreciated,
> 
> Jose
> _______________________________________________
> 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