EEG data rank

423 views
Skip to first unread message

Karlo Gonzales

unread,
Nov 2, 2015, 12:17:22 PM11/2/15
to Mike X Cohen, analyzingneura...@googlegroups.com

Dear friends,

I have a confusing about the implication of EEG data rank, and hopely you can clarify it!!

I consider "rank" as independency measure  of matrix. Thus, for a 62 channel EEG data, rank(EEG.data(:,:)) should be 62, as all electrodes supposed to record independently.

So, if result of rank(EEG.data(:,:)) returns 31,should I be worried about quality if data?

Thanks in advance,
Karlo


Mike X Cohen

unread,
Nov 2, 2015, 1:20:19 PM11/2/15
to analyzingneura...@googlegroups.com
Hi Karlo. First of all, there are a few different ways of computing the rank of a matrix. The textbook way to do it is to do row-reduction and count the number of pivots. Matlab does an SVD and counts the number of singular values that are "big enough," according to some tolerance threshold. In this method, you can actually change the rank of the data by changing the threshold. Many people would also estimate the rank based on the covariance matrix of the data, not directly on the data. You could try that and see how it compares ("in theory" the number of independent columns in A should be the same as the number of independent columns in A^TA, but given the algorithm, I wonder if it might differ). 

Nonetheless, you are correct that 31 is a low rank for 62-channel EEG data. Although the EEG electrodes are "independent" measurements, there is volume conduction, there could be bridges, and ICA removal will reduce the rank (in fact, we always say "subtracting components" when in fact we are projecting the data to a lower-dimensional subspace). It is common to have a rank less than the number of electrodes, but it's typically just a few points below (e.g., rank=62 for 64 channels). 

When you plot the raw data, does it look like you have redundant channels? And if you compute all-to-all channel correlations, do you see many that are >.95? Did you remove an excessive number of ICs (if any)?

Otherwise I'm not sure what to say. How much time is in the data? If it's a long recording, perhaps try computing the rank on a subset of data, e.g., over a few seconds.

Sounds like an interesting mystery; let us know what you find!

Mike



--
Mike X Cohen, PhD
mikexcohen.com

Mike X Cohen

unread,
Nov 6, 2015, 4:06:29 AM11/6/15
to Karlo Gonzales, analyzingneura...@googlegroups.com
Hi Karlo. I suspect the problem is a combination of the average
reference and the ERP. ERPs involve a fairly massive loss of
information in the data. Perhaps you can try computing the rank of the
single-trial data to see whether that's higher. You might also try
this analysis on the book sample EEG data, which I believe has a rank
of 62 or thereabouts.

Mike



On 11/5/15, Karlo Gonzales <thats....@gmail.com> wrote:
> Dear Mike,
>
> Thanks again for your response.
>
> - Our EEG data usually consists of 62 or 61 electrodes, 100 epoch with 4sec
> length (Fs=1000).
> - for example: load a raw data (visually inspected to remove artifacts) ,
> re-reference to average and then : rank(EEG.data(:,:)) =12
> - i calculate correlation as follow:
>
> *ERP=mean(EEG.data,3);*
>
> *for i=1:62*
> * for j=1:62 *
> * [aa,bb] = corrcoef( double( ERP(i,1700:end) ),double(
> ERP(j,1700:end) ) );*
> * r(i,j)=aa(1,2); p(i,j)=bb(1,2);*
> * end*
> *end*
>
> f*igure(2), imagesc((r)) , figure(3), imagesc(-log10(p/62)) % divided by
> 62 for multiple comparison *
>
>
>
> [image: Inline image 1] [image: Inline image 2]
>
>
>
> it seems, this typical data shows very high correction, anti-correction
> value between electrodes.
>
> Would you please tell me what do you think about this data?
>> --
>> You received this message because you are subscribed to the Google Groups
>> "AnalyzingNeuralTimeSeriesData" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to analyzingneuraltimes...@googlegroups.com.
>> Visit this group at
>> http://groups.google.com/group/analyzingneuraltimeseriesdata.
>> For more options, visit https://groups.google.com/d/optout.

Mike X Cohen

unread,
Nov 6, 2015, 12:18:31 PM11/6/15
to analyzingneura...@googlegroups.com
Hi Karlo. So it's not a matter of referencing or ERP. 

ICA will reduce the rank (that's why the sample dataset has 64 channels but rank=62). Did you remove ~37 components? If so, that's probably way too much. I try to remove only 1-2 components (though up to 5 is fairly realistic). 

If not, then I don't know. I guess bridging is a possible explanation (btw, thanks for finding and sharing that link for the script to identify bridges!). Did you see whether the bridges were always neighboring electrodes? 

Otherwise, I don't know what to tell you. It seems that matrix algebra thinks you really just have 25 channels, and the rest are linear combinations of those 25. If this is typical of all your subjects, I suspect there may be something wrong with the hardware (wires fused in the amp?) or with the preparation (way too much gel). 

One question is whether this is really a fatal problem. If you are just looking at ERPs or TF power, unless you want to make really strong claims about localization, I don't think this is a huge deal. It does kill any chances of doing connectivity or source localization analyses, though.

Mike



On Fri, Nov 6, 2015 at 5:49 PM, Karlo Gonzales <thats....@gmail.com> wrote:
Hi Mike,

- As you expected rank of "sampleEEGdata" is 62.  Re-referencing to average didn't change the rank . Even, ERP showed 62 for rank.

- I found and ran a script to identify electrical bridge  (http://psychophysiology.cpmc.columbia.edu/eBridge), surprisingly, it identified  25 pairs, which might explain the low rank value in our data.

We had ran ICA on this data to reject artifact. would running ICA on a 62-channles data with rank= 25 give a valid results?

- BTW, the correlation method that i used basically shows very correlated data: i ran the code for "sampleEEGdata",
figure 2 and 3  is for a random signle-trial  and  figure 4,5 for ERP. If p==0.05 indicates significant results, then everything beyond -log10(0.05/64)=3.1  represent significant correlation.

could you please tell me if this is a correct method and conclusion or i am missing something?

Yours,
Karlo


Karlo Gonzales

unread,
Nov 6, 2015, 3:58:03 PM11/6/15
to analyzingneura...@googlegroups.com
Hi Mike,

-  I was checking rank before ICA. For a tested data(62 channels), rank of data was 41, but number of  ICA component was equal to the the number of channels.
-  Fortunately, it doesn't happened for all data sets. and as you said, it must be due to bad cap or excessive of gels.
- BTW, does highly significant correlation value between electrode make sense, even for "sampleEEGdata"? or this simple calculation is not valid  ?

Yours,
Karlo

Mike X Cohen

unread,
Nov 6, 2015, 4:43:30 PM11/6/15
to analyzingneura...@googlegroups.com
If you get a rank of 41 before ICA removal, then yeah that's something to be concerned about. Good that it doesn't happen for all subjects. If possible, you may want to exclude the datasets that have this problem. The math is telling you that only 2/3 of the channels are actually providing separate measurements of brain activity.

As for the strong correlations, yes definitely they should all be strongly correlated (weaker with the Laplacian). This is largely due to volume conduction, which is why the Laplacian will attenuate it. You have a look, for example, at figure 22.7, which shows that a lot of variance in connectivity is explained by inter-electrode distance (which here acts as a proxy measure for volume conduction). 

It's unfortunate that you didn't discover this issue until after (I assume from your description) the data were collected. But it's good that you found it and you know about it now. (And also good to discuss it on this list so other people are aware of it as well.)

Mike


Karlo Gonzales

unread,
Nov 6, 2015, 5:00:14 PM11/6/15
to analyzingneura...@googlegroups.com
Thank you so much for your time and patient! your valuable guides as always helped  to clarify the issue and have better understanding of signal processing.

Yours,
Karlo

Reply all
Reply to author
Forward
0 new messages