[Eeglablist] injecting ICA weights from one dataset to another

José Luis joseluisulloafulgeri at gmail.com
Thu May 25 06:22:33 PDT 2017


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20170525/03e0d16c/attachment.html>


More information about the eeglablist mailing list