[Eeglablist] Adjust data rank for ICA?

Cedric Cannard ccannard at protonmail.com
Mon Feb 27 14:28:19 PST 2023


Hi Anna,

Not sure what this code does.

Yes, to take into account data rank deficiency when running ICA, do this:

dataRank = sum(eig(cov(double(EEG.data'))) > 1E-7);  % get accurate data rank
EEG = pop_runica(EEG,'icatype','runica','extended',1,'pca',datarank);

Remove the GYRO channels before ICA and do not try to interpolate them. You can add them back later if you need them. 

Make sure you don't interpolate channels before ASR. 

Note that EEGLAB's official guideline is to interpolate channels later at the STUDY level.

Cedric



------- Original Message -------
On Friday, February 17th, 2023 at 11:14 AM, Anna Bánki <anna.banki at univie.ac.at> wrote:


> Hi Daniele, Julia,
> 
> 
> I am also interpolating some bad channels (max 3-4) before running ICA. Could you help, apart from changing max to min in the pop_runica[] script, would you also set back the full rank before running ICA with this code?
> 
> 
> channelSubset = loc_subsets(EEG.chanlocs, yourDataRankHere);
> EEG = pop_select( EEG,'channel', channelSubset{1});
> EEG = pop_chanedit(EEG, 'eval','chans = pop_chancenter( chans, [],[]);');
> 
> 
> https://sccn.ucsd.edu/wiki/Makoto's_preprocessing_pipeline#Interpolate_all_the_removed_channels_.2803.2F05.2F2021_updated.29
> 
> In my layout, there are 3 gyroscope channels on top of the 24 scalp channels, so for now, I only selected my channels as 1:24 before ICA, but did not consider the rank-deficiency issue.
> 
> 
> Thanks,
> 
> Anna
> 
> ________________________________
> From: eeglablist eeglablist-bounces at sccn.ucsd.edu on behalf of Daniele Scanzi dsca347 at aucklanduni.ac.nz
> 
> Sent: 16 February 2023 21:47
> To: Julia Basso
> Cc: eeglablist at sccn.ucsd.edu
> Subject: Re: [Eeglablist] Adjust data rank for ICA?
> 
> Hi Julia,
> 
> From my understanding, you should still change that line (I think it is
> line 624) from max to min, otherwise 'runica' most likely won't adjust for
> rank-deficient data.
> 
> Cheers,
> 
> Daniele
> 
> On Fri, 17 Feb 2023 at 09:34, Julia Basso jbasso at vt.edu wrote:
> 
> > Hi,
> > 
> > We are reading Makato's preprocessing pipeline and utilizing the general
> > pipeline for our dataset. We have interpolated across some bad channels and
> > have taken note of the section on "Adjust data rank for ICA". We see that
> > he recommends changing one line of code in pop_runica() from max to min, to
> > adjust for the number of interpolated channels. However, this was a note
> > from 5/17/19. Has anything been adjusted in the current code to adjust for
> > this problem?
> > 
> > Do you recommend doing this or should we leave it at max?
> > 
> > Thank you for any help you can provide!
> > 
> > Best,
> > 
> > Dr. Basso
> > 
> > --
> > _______________________________________________
> > 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