[Eeglablist] EEG data rank
Makoto Miyakoshi
mmiyakoshi at ucsd.edu
Fri Mar 5 14:16:07 PST 2021
Dear Cedric,
> Why isn't rank-deficiency detection the default?
I don't know. But there are many other things you want to ask the same
question, hence it is a question but not an urgent question.
> Also, why is running ICA after channel interpolation and
average-referencing always recommended in the wiki if that poses
rank-deficiency problems?
See this article.
https://sccn.ucsd.edu/wiki/Makoto%27s_preprocessing_pipeline#Interpolate_all_the_removed_channels_.2803.2F05.2F2021_updated.29
> Why not removing bad channels and trials, run ICA and remove bad ICs,
re-reference, and then interpolate bad channels from this cleaned data?
What if many electrodes are removed from the right hemisphere only? What
happens to the estimate of the average potential?
> I saw on your page that the average ref makes all the ICA scalp
topography have zero total potential and helps to remove line noise. While
the line noise argument is not an advantage in my case as I low-pass below
it, what is the advantage regarding the potentials?
First of all, if you are planning to perform the group-level statistics
only with ICs, the selection of reference status is nothing but trivial.
That being said, average reference is one simple solution to estimate a
relatively unbiased reference point (assuming that you have relatively
large number of electrodes such as 32--However, even if you have less
number of electrodes than this number, I tend to believe that average
reference has a good point. The problem of using small number of electrodes
here is that deviation from the hypothetical average across all the surface
area of the scalp becomes large. I'm trying to say that even if this
assumption is violated, it seems there is still an advantage of using
average reference in other points, such as unbiasedness etc. But this issue
is too much to discuss here, it requires careful thinking. I hope Ramesh is
not checking here ha ha).
> does it create 2 corrupted components (1 for each charge) instead of 1?
Doesn't ICA remove both polarities of the same component anyway?
What do you mean by charge? Like a monopolar charge? You don't typically
find monopolar scalp topos though in ICA results.
ICA does not remove anything. It does model your data based on the
assumption of source independence. I guess I don't get what you are asking
here. Maybe you want to rephrase the question for me please?
Makoto
On Fri, Mar 5, 2021 at 11:44 AM Cedric Cannard <ccannard at protonmail.com>
wrote:
> Hi Makoto,
>
> Thank you and sorry as this topic has probably been discussed so many
> times in the past.
>
> I found yesterday that same code by Sven Hoffman at the end of pop_runica
> and other eeglablist threads:
> covarianceMatrix = cov(EEG.data', 1);
> [~, D] = eig(covarianceMatrix);
> rankTolerance = 1e-7;
> data_rank = sum(diag(D) > rankTolerance);
> However, it was missing the double-precision, which was also giving me the
> wrong data rank. And it's nice to have it in 1 line now, thanks.
>
> I am now able to avoid the corrupted decompositions I was getting because
> of the rank deficiency by adding the 'pca' -(EEG.nbchan-dataRank)) when
> running ICA. I was getting this message even though I am not on Linux:
> Warning: fixing rank computation inconsistency (64 vs 60) most likely
> because running under Linux 64-bit Matlab
> Do I get this error because I don't have enough memory when trying to
> convert to double precision as for binica option (line 401)? This seems
> unlikely though.
> And it looks like it is taking the highest rank 64 detected by the getrank
> function instead of the rank 60, which led to corrupted decompositions
> (pop_runica line 595). But I am now seeing on your preprocessing pipeline
> page that you use the min instead of max, which makes more sense to me.
>
> Considering the implications for both ICA and ASR, did I miss a pull or is
> this just not validated yet? Why isn't rank-deficiency detection the
> default?
>
> Also, why is running ICA after channel interpolation and
> average-referencing always recommended in the wiki if that poses
> rank-deficiency problems?
> Why not removing bad channels and trials, run ICA and remove bad ICs,
> re-reference, and then interpolate bad channels from this cleaned data?
> I saw on your page that the average ref makes all the ICA scalp topography
> have zero total potential and helps to remove line noise. While the line
> noise argument is not an advantage in my case as I low-pass below it, what
> is the advantage regarding the potentials? does it create 2 corrupted
> components (1 for each charge) instead of 1? Doesn't ICA remove both
> polarities of the same component anyway?
>
> Thanks in advance,
>
> Cedric
>
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Friday, March 5, 2021 9:50 AM, Makoto Miyakoshi <mmiyakoshi at ucsd.edu>
> wrote:
>
> > Dear Cetric,
> >
> > See this article for your info.
> >
> https://sccn.ucsd.edu/wiki/Makoto's_useful_EEGLAB_code#How_to_avoid_the_effect_of_rank-deficiency_in_applying_ICA_.2803.2F02.2F2021_added.29
> >
> > Makoto
> >
> > On Thu, Mar 4, 2021 at 2:47 PM Cedric Cannard ccannard at protonmail.com
> > wrote:
> >
> > > Hi,
> > > Never mind, it works with rank(double(EEG.data))
> > > Sorry, I thought EEGLAB' data had double precision by default.
> > > Cedric
> > > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> > > On Wednesday, March 3, 2021 6:27 PM, Cedric Cannard <
> > > ccannard at protonmail.com> wrote:
> > >
> > > > Hi everyone,
> > > > I was trying to assess data rank after importing some Biosemi and
> > > > Neuroscan data, trying different importing methods, as well as
> > > > re-referencing methods (average and REST) to see their impacts on
> rank, but
> > > > get weird numbers (e.g. rank 1, 9, 21 with 64 channels data). I have
> been
> > > > using rank(EEG.data) in Matlab 2020b.
> > > > I have tried importing data with pop_biosig and pop_readbdf, with Cz
> as
> > > > reference or no reference (same results), and pop_loadcnt for
> neuroscan
> > > > .cnt data.
> > > > I am also seeing rank changes after downsampling, filtering,
> > > > interpolating channels, etc.
> > > > Is this not the right way to assess rank?
> > > > Cedric
> > >
> > > 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