[Eeglablist] ICA preprocessing and bipolar montage configuration

Makoto Miyakoshi mmiyakoshi at ucsd.edu
Tue Jun 21 10:48:19 PDT 2022


Dear Jason,

Thank you for your reply.
Again, please pay attention to this realistic condition: ...when the
bipolar pairs are not redundantly connected to each other?

To repeat, the realistic bipolar reference does not connect all the
electrodes like a chain, but it is more like a collection of isolated
pairs. It'll be like this:

M =
1 -1 0 0 0 0
0 0 1 -1 0 0
0 0 0 0 -1 1

rather than

M =
1 -1 0 0 0 0
0 1 -1 0 0 0
0 0 1 -1 0 0
...

Do you see the difference?

In words, an electrode is connected to only one electrode, no more than
two. In your case, one electrode is connected to two other electrodes. This
is what I call a redundant connection which EEG researches do not do.

The bipolar reference users' question is, in the former instance, NOT the
latter one, is there a way to 'use' ICA meaningfully.

Makoto

On Tue, Jun 21, 2022 at 10:37 AM Jason Palmer <japalmer29 at gmail.com> wrote:

> Makoto,
>
> Yes it is possible. The bipolar matrix defines up to nchan-1 bipolar
> pairs, and the remaining rows are defined so as to make the matrix
> invertible. For example if we have 5 channels, you can define the bipolar
> matrix as:
>
> M =
>
>     1.0000   -1.0000         0         0         0
>          0    1.0000   -1.0000         0         0
>          0         0    1.0000   -1.0000         0
>          0         0         0    1.0000   -1.0000
>    -0.2500   -0.2500   -0.2500   -0.2500    0.7500
>
> Here the last channel is 1/(nchan-1) times itself minus the average of the
> other channels. (It could also be [0 0 0 0 1]).  Then the inverse is:
>
> >> inv(M)
>
> ans =
>
>      0    -1    -2    -3    -4
>     -1    -1    -2    -3    -4
>     -1    -2    -2    -3    -4
>     -1    -2    -3    -3    -4
>     -1    -2    -3    -4    -4
>
> Then you can run ICA on M * EEG.data. And then look at component maps
> inv(M) * EEG.icawinv.
>
> Best,
> Jason
>
>
>
> On Tue, Jun 21, 2022 at 10:26 AM Makoto Miyakoshi <mmiyakoshi at ucsd.edu>
> wrote:
>
>> Dear Jason,
>>
>> Sorry for the late reply. There was a big conference we hosted and I got
>> interrupted.
>>
>> So, is it possible to run ICA meaningfully on bipolar-referenced data
>> when the bipolar pairs are not redundantly connected to each other? I'm
>> still not convinced and believe it is impossible.
>>
>> Once we reach a clear conclusion, I'll summarize my understanding and add
>> it to SCCN Wiki page. Please help me.
>>
>> Makoto
>>
>> On Thu, Jun 2, 2022 at 1:37 AM Jason Palmer <japalmer29 at gmail.com> wrote:
>>
>>> Sorry, I realized the last row should be [-0.25 -0.25 -0.25 1-0.25] for
>>> avg reference of the last channel, and this makes the matrix rank deficient
>>> again.
>>>
>>>
>>>
>>> So I think the matrix should just be something like:
>>>
>>>
>>>
>>> M = [1 -1  0  0 ;
>>>
>>>          0  1 -1  0 ;
>>>
>>>          0  0  1 -1 ;
>>>
>>>          0  0  0  1 ];
>>>
>>>
>>>
>>> The last channel would probably result in a 50 or 60 Hz line noise
>>> component after ICA since the bipolar channels will have the common line
>>> noise largely attenuated.
>>>
>>>
>>>
>>> Jason
>>>
>>>
>>>
>>> *From:* Jason Palmer [mailto:japalmer29 at gmail.com]
>>> *Sent:* Wednesday, June 1, 2022 9:27 PM
>>> *To:* 'Makoto Miyakoshi' <mmiyakoshi at ucsd.edu>
>>> *Cc:* 'Scott Makeig' <smakeig at gmail.com>; 'EEGLAB List' <
>>> eeglablist at sccn.ucsd.edu>
>>> *Subject:* RE: [Eeglablist] ICA preprocessing and bipolar montage
>>> configuration
>>>
>>>
>>>
>>> Actually it would probably be better to replace the last row with
>>> -ones(1,nbchan)/nbchan. So, e.g.,
>>>
>>>
>>>
>>> M = [1        -1         0         0 ;
>>>
>>>          0         1        -1         0 ;
>>>
>>>          0        0         1        -1 ;
>>>
>>>         -0.25 -0.25 -0.25 -0.25 ];
>>>
>>>
>>>
>>> This way the non-bipolar channel becomes an average referenced version
>>> of itself. This is still invertible.
>>>
>>>
>>>
>>> *From:* Jason Palmer [mailto:japalmer29 at gmail.com <japalmer29 at gmail.com>]
>>>
>>> *Sent:* Wednesday, June 1, 2022 8:57 PM
>>> *To:* 'Makoto Miyakoshi' <mmiyakoshi at ucsd.edu>
>>> *Cc:* 'Scott Makeig' <smakeig at gmail.com>; 'EEGLAB List' <
>>> eeglablist at sccn.ucsd.edu>
>>> *Subject:* RE: [Eeglablist] ICA preprocessing and bipolar montage
>>> configuration
>>>
>>>
>>>
>>> Makoto,
>>>
>>>
>>>
>>> You are right, if the M matrix has only 1 -1 pairs in rows, then it is
>>> not full rank. However, if you use 1 -1 pairs for all but one, channel, e.g.
>>>
>>>
>>>
>>> M = [1 -1  0  0 ;
>>>
>>>          0  1 -1  0 ;
>>>
>>>          0  0  1 -1 ;
>>>
>>>          0  0  0  1 ];
>>>
>>>
>>>
>>> This has 3 pairs and leaves one channel unchanged, and it is full rank
>>> and invertible. It is not necessary for the bipolar matrix to have all 1 -1
>>> pairs, just the ones that are relevant.
>>>
>>>
>>>
>>> Jason
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *From:* Makoto Miyakoshi [mailto:mmiyakoshi at ucsd.edu
>>> <mmiyakoshi at ucsd.edu>]
>>> *Sent:* Wednesday, June 1, 2022 8:13 PM
>>> *To:* Jason Palmer <japalmer29 at gmail.com>
>>> *Cc:* Scott Makeig <smakeig at gmail.com>; EEGLAB List <
>>> eeglablist at sccn.ucsd.edu>
>>> *Subject:* Re: [Eeglablist] ICA preprocessing and bipolar montage
>>> configuration
>>>
>>>
>>>
>>> Jason, your example uses redundant bipolar referencing, which is A-B,
>>> B-C, C-D as I explained above. This can be confirmed in your example below
>>> (I changed your B to M because I use A B C D for electrode indices)
>>>
>>>
>>>
>>> > A bipolar channel matrix looks like:
>>> >
>>> > M = [ 1 -1 0 0 0 0 0 …. ;
>>> >
>>> >          0 1 -1 0 0 0 0 …. ;
>>> >
>>> >          0 0  1 -1 0 0 0 … ;
>>>
>>>
>>>
>>> Note the rank of this data is nbchan-1, which is the same as the
>>> unipolar recorded EEG data including the initial reference. In other words,
>>> your example does not differ from unipolarly recorded data!
>>>
>>>
>>>
>>> But I'm talking about the case in which only A-B and C-D pairs are
>>> available without B-C. The reason why I assume this is because this is the
>>> reality of bipolar reference. In this case, M is
>>>
>>>
>>>
>>> M = [ 1 -1 0 0 0 0 0 …. ;
>>>          0 0 1 -1 0 0 0 … ;
>>>
>>>          0 0 0 0 1 -1 0 ...;
>>>
>>>
>>>
>>> M is not invertible.
>>>
>>>
>>>
>>> > It should be possible to define a square, invertible bipolar matrix
>>> (which I called B, but is called M here).
>>>
>>>
>>>
>>> I want to first confirm if your explanation is still valid for my
>>> 'realistic bipolar reference M' scenario.
>>>
>>>
>>>
>>> Makoto
>>>
>>>
>>>
>>> On Wed, Jun 1, 2022 at 7:13 PM Jason Palmer <japalmer29 at gmail.com>
>>> wrote:
>>>
>>> Hi Makoto,
>>>
>>>
>>>
>>> It should be possible to define a square, invertible bipolar matrix
>>> (which I called B, but is called M here). Then I don’t think there needs to
>>> be a caveat about the interpretation.
>>>
>>>
>>>
>>> Jason
>>>
>>>
>>>
>>> *From:* Makoto Miyakoshi [mailto:mmiyakoshi at ucsd.edu]
>>> *Sent:* Wednesday, June 1, 2022 11:12 AM
>>> *To:* Scott Makeig <smakeig at gmail.com>; Jason Palmer <
>>> japalmer29 at gmail.com>
>>> *Cc:* EEGLAB List <eeglablist at sccn.ucsd.edu>
>>> *Subject:* Re: [Eeglablist] ICA preprocessing and bipolar montage
>>> configuration
>>>
>>>
>>>
>>> Dear Scott and Jason,
>>>
>>>
>>>
>>> See this comment from one of the discussions on the list from 2017,
>>> particularly the last highlighted part.
>>>
>>> Scott, we discussed this issue during tea time. Did you reach a
>>> different conclusion? Do we want to correct this conclusion?
>>>
>>>
>>>
>>> Makoto
>>>
>>>
>>>
>>> %%%%%%%%%%%%%%%%%
>>>
>>> https://sccn.ucsd.edu/pipermail/eeglablist/2017/012597.html
>>>
>>>
>>>
>>> [Eeglablist] convert EEG montage from bipolar to unipolar
>>> Makoto Miyakoshi mmiyakoshi at ucsd.eduThu May 25 12:35:12 PDT 2017
>>>
>>>
>>>
>>> Dear colleagues,
>>>
>>> Update--
>>>
>>> I discussed this method with the colleague who taught me about this trick
>>>
>>> because I got an inquiry about it off the list.
>>>
>>> He said that he would use it only to draw a scalp topography, and
>>>
>>> performing signal processing using the 'recovered' full-channel signal is
>>>
>>> not recommended.
>>>
>>>
>>>
>>> Again, let X be the (single-channel referenced) original EEG data and Xb
>>>
>>> the bipolar-montage version of it.
>>>
>>> Using a bipolar-referencing transform matrix M, the relation of X and Xb
>>>
>>> can be written as
>>>
>>>
>>>
>>> Xb = M * X
>>>
>>>
>>>
>>> Suppose X has 6 channels F1, F2, C1, C2, P1, P2, and bipolar-referencing
>>>
>>> was done with F1-F2, C1-C2, P1-P2.
>>>
>>> Then, Xb is 3*t, M is 3*6, and X is 6*t (t is time).
>>>
>>> The matrix M is
>>>
>>>
>>>
>>> 1 -1 0 0 0 0
>>>
>>> 0 0 1 -1 0 0
>>>
>>> 0 0 0 0 1 -1
>>>
>>>
>>>
>>> (sorry but I don't have code)
>>>
>>> To compute M^-1, one should use pinv() (i.e. pseudo-inverse) and the
>>>
>>> recovered full-channel data are NOT full-ranked (and this is NOT the only
>>>
>>> solution)
>>>
>>> To recover full channel data, you also need to have something like F1-C1,
>>>
>>> C2-P1, P2-F2 so that the matrix is full-ranked and square, but such data
>>>
>>> are not usually available (as far as I know, Paul Sajda presented such a
>>>
>>> complicated reference system to address high-amplitude artifact in
>>>
>>> simultaneous fMRI-EEG recording).
>>>
>>>
>>>
>>> So the recommended use of this solution is just to draw scalp topography
>>>
>>> for convenience.
>>>
>>>
>>>
>>> Accordingly, let me correct my previous statement.
>>>
>>>
>>>
>>> >* Thus, by multiplying the inverse matrix of the known bipolar-referencing*
>>>
>>> transform matrix M, you obtain the original signal.
>>>
>>>
>>>
>>> This is true ONLY IF you have redundantly referenced channels (which is
>>>
>>> very rare). Otherwise, it does NOT properly convert standard bipolar
>>>
>>> montage to a single-referenced data (because M is not square), therefore
>>>
>>> analyzing the 'recovered' data should be limited to specific purposes only.
>>>
>>>
>>>
>>> Sorry if my previous writing was misleading.
>>>
>>>
>>>
>>> Makoto
>>>
>>>
>>>
>>> On Wed, Jun 1, 2022 at 10:29 AM Scott Makeig <smakeig at gmail.com> wrote:
>>>
>>> Jason -
>>>
>>> Thanks - exact, as usual for you ... I am looking to try it - then put it
>>> into EEGLAB.
>>>
>>> Scott
>>>
>>> On Wed, Jun 1, 2022 at 1:13 PM Jason Palmer <japalmer29 at gmail.com>
>>> wrote:
>>>
>>> > ICA will try to produce independent sources (the s below) regardless of
>>> > how they are linearly mixed.
>>> >
>>> >
>>> >
>>> > A bipolar channel matrix looks like:
>>> >
>>> >
>>> >
>>> > B = [ 1 -1 0 0 0 0 0 …. ;
>>> >
>>> >          0 1 -1 0 0 0 0 …. ;
>>> >
>>> >          0 0  1 -1 0 0 0 … ;
>>> >
>>> >          ...
>>> >
>>> >          ];
>>> >
>>> >
>>> >
>>> > Or similar, depending on how you define the bipolar channels.
>>> >
>>> >
>>> >
>>> > And the raw data x, after bipolar channel extraction is B*x = B*A*s,
>>> where
>>> > A is mixing matrix topo maps, and s is the source vector. If you run
>>> ICA on
>>> > B*x, then you get a decomposition with a mixing matrix M. This is not
>>> > necessarily interpretable with topoplot. To get the actual topo maps,
>>> you
>>> > need to invert the bipolar matrix:
>>> >
>>> >
>>> >
>>> >                B*A = M    =>    A = pinv(B)*M
>>> >
>>> >
>>> >
>>> > where again, B is the custom bipolar channel difference matrix, and M
>>> is
>>> > the EEG.icawinv after running ICA on B*x (where x is EEG.data). The
>>> columns
>>> > of this A matrix should be as usual. Using the bipolar differences
>>> might
>>> > remove more far field noise and components vs usual raw channels.
>>> >
>>> >
>>> >
>>> > Jason
>>> >
>>> >
>>> >
>>> > *From:* Scott Makeig [mailto:smakeig at gmail.com]
>>> > *Sent:* Wednesday, June 1, 2022 10:01 AM
>>> > *To:* Jason Palmer <japalmer29 at gmail.com>
>>> > *Cc:* Velu Prabhakar Kumaravel <velu.kumaravel at unitn.it>; EEGLAB List
>>> <
>>> > eeglablist at sccn.ucsd.edu>
>>> > *Subject:* Re: [Eeglablist] ICA preprocessing and bipolar montage
>>> > configuration
>>> >
>>> >
>>> >
>>> > Jason -  But the mapping problem remains, no? Will ICA make the IC maps
>>> > (including somehow the bipolar channel) smooth even when the data
>>> contains
>>> > a bipolar channel?  What about this argument:  Making such a dataset
>>> > zero-mean does not necessarily mean that the difference between the
>>> common
>>> > reference and each electrode in the bipolar channel is 0.  If the
>>> sources
>>> > were [equally everywhere], then this might be the case, but in actual
>>> fact,
>>> > is it?
>>> >
>>> >
>>> >
>>> > Scott
>>> >
>>> >
>>> >
>>> > On Wed, Jun 1, 2022 at 12:07 PM Jason Palmer <japalmer29 at gmail.com>
>>> wrote:
>>> >
>>> > A bipolar montage is basically just a linear transformation, and
>>> assuming
>>> > you use at most nbchan number of bipolar channels, it is invertible.
>>> >
>>> >         x = A*s
>>> >         B*x = B*A*s = M*s
>>> >         A = inv(B) * M
>>> >
>>> > Where B is the bipolar montage with 1 -1 in the columns corresponding
>>> to
>>> > the
>>> > bipolar difference for each row, and M is the EEG.icawinv after
>>> running ica
>>> > on the bipolar transformed data.
>>> >
>>> > Jason
>>> >
>>> > -----Original Message-----
>>> > From: eeglablist [mailto:eeglablist-bounces at sccn.ucsd.edu] On Behalf
>>> Of
>>> > Scott Makeig
>>> > Sent: Wednesday, June 1, 2022 8:52 AM
>>> > To: Velu Prabhakar Kumaravel <velu.kumaravel at unitn.it>
>>> > Cc: EEGLAB List <eeglablist at sccn.ucsd.edu>
>>> > Subject: Re: [Eeglablist] ICA preprocessing and bipolar montage
>>> > configuration
>>> >
>>> > Velu -
>>> >
>>> > ICA is a linear decomposition, so should be able to decompose bipolar
>>> and
>>> > common-reference channels in the same session together. However, the
>>> > bipolar
>>> > channels will be 'floating' with respect to the common-reference
>>> channels.
>>> > This might interfere with the decomposition (I have no practical
>>> experience
>>> > here) - but even if not it will mean that the ICA scalp maps should
>>> not be
>>> > plotted to include the bipolar channels. Here I imagine you might try
>>> to
>>> > find fixed offsets representing a 'standing difference'
>>> > between each bipolar channel and the common reference channel that
>>> would
>>> > produce max smooth  IC maps -- but are these differences reliably
>>> > stationary? I'd be interested to see a result of attempting this ...
>>> >
>>> > Scott Makeig
>>> >
>>> > On Wed, Jun 1, 2022 at 11:42 AM Velu Prabhakar Kumaravel <
>>> > velu.kumaravel at unitn.it> wrote:
>>> >
>>> > > Dear EEGLABers,
>>> > >
>>> > > Does anyone know the effects of ICA preprocessing on EEG acquired
>>> > > using bipolar configuration?
>>> > > I tried on a few datasets and it looks like the decomposition is not
>>> > > effective. Classifying using ICLabel results in more number of
>>> "Other"
>>> > > category.
>>> > >
>>> > > Could someone provide insights on this?
>>> > >
>>> > > Best regards,
>>> > >
>>> > > Velu Prabhakar Kumaravel, Ph.D. Student Center for Mind/Brain
>>> > > Sciences, University of Trento, Italy
>>> > > _______________________________________________
>>> > > 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
>>> > >
>>> >
>>> >
>>> > --
>>> > Scott Makeig, Research Scientist and Director, Swartz Center for
>>> > Computational Neuroscience, Institute for Neural Computation,
>>> University of
>>> > California San Diego, La Jolla CA 92093-0559,
>>> http://sccn.ucsd.edu/~scott
>>> > _______________________________________________
>>> > 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
>>> >
>>> >
>>> >
>>> >
>>> > --
>>> >
>>> > Scott Makeig, Research Scientist and Director, Swartz Center for
>>> > Computational Neuroscience, Institute for Neural Computation,
>>> University of
>>> > California San Diego, La Jolla CA 92093-0559,
>>> http://sccn.ucsd.edu/~scott
>>> >
>>>
>>>
>>> --
>>> Scott Makeig, Research Scientist and Director, Swartz Center for
>>> Computational Neuroscience, Institute for Neural Computation, University
>>> of
>>> California San Diego, La Jolla CA 92093-0559,
>>> http://sccn.ucsd.edu/~scott
>>> _______________________________________________
>>> 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