[Eeglablist] Rank before ICA

Iversen, John jiversen at ucsd.edu
Tue Aug 24 10:30:18 PDT 2021


FYI, Makoto Miyakoshi has written about this, and wrote a plugin as well. See https://sccn.ucsd.edu/wiki/Makoto's_preprocessing_pipeline#Re-reference_the_data_to_average_.2808.2F02.2F2020_Updated.29



His preprocessing page has a wealth of information.

Your implementation matches Makoto's fullRankAveRef.m :

% Apply average reference after adding initial reference
EEG.nbchan = EEG.nbchan+1;
EEG.data(end+1,:) = zeros(1, EEG.pnts);
EEG.chanlocs(1,EEG.nbchan).labels = 'initialReference';
EEG = pop_reref(EEG, []);
EEG = pop_select( EEG,'nochannel',{'initialReference'});

The only difference is you are using epoched data, while his was designed for continuous data. I see no functional difference between referencing before or after epoching, since it's done on a point-by-point basis.

FYI, comments on whether to epoch before of after ICA are here: https://sccn.ucsd.edu/wiki/Makoto's_preprocessing_pipeline#Epoch_data_to_-1_to_2_sec_.2809.2F11.2F2019_updated.29



On Aug 24, 2021, at 4:21 AM, Eric HG via eeglablist <eeglablist at sccn.ucsd.edu<mailto:eeglablist at sccn.ucsd.edu>> wrote:

Dear Eeglablist,

I have had some troubles with the rank of the data after re-referencing to

I have therefore used the following code before ICA:

rank_one = rank(EEG.data(:,:));
   EEG.nbchan = EEG.nbchan+1;
   EEG.data(EEG.nbchan,:,:) = zeros(1, EEG.pnts, EEG.trials);
   EEG.chanlocs(EEG.nbchan).labels = 'Ref';
   EEG = pop_reref(EEG, []);
   EEG = pop_select( EEG,'nochannel',{'Ref'});
   rank_two = rank(EEG.data(:,:));

Is this a feasible way to overcome this?

It gives good results with ICA decomposition.

Best regards,

Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu<mailto: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<mailto:eeglablist-request at sccn.ucsd.edu>

More information about the eeglablist mailing list