[Eeglablist] Error in running ICA

Makoto Miyakoshi mmiyakoshi at ucsd.edu
Thu Jul 12 17:48:44 PDT 2018


Dear Edwige,

Thank you Edwige for clear explanation.

> 1) For participant 9, ICA was not successful and during running ICA it
only got until step one where I got the error message. Therefore, there is
no information about the variable icasphere.

Good to discover the problem. Check what was wrong and confirm if ICA can
be performed successfully.

> 2) With your suggestion, I checked again for all my participants whether
nbchan and icasphere are the same, I discovered that for the ones that I
did not exclude the eye electrode before ICA and where I clicked on the
'...channel' thing, I got ICA where the number of channels is NOT equal to
icasphere. Do you think I should run ICA again for these participants where
number of channels is NOT equal to icasphere?

Yes, you should run ICA again to see if it works.
If ICA takes too long time, you can specify the ICA iteration number by
using 'maxsteps', 20 to stop at 20th iteration for example.

Looks like the problem is almost solved. Looking forward to good news!

Makoto


On Thu, Jul 12, 2018 at 1:41 AM Sijyeniyo, E. <e.sijyeniyo at student.rug.nl>
wrote:

> Dear Makoto,
>
> Here is the output I get if I type "EEG" for this particular participant
> (participant 9):
>
> EEG =
>
>   struct with fields:
>
>              setname: 'SPES_cleanwithouteyes_[pp0009] '
>             filename: '9_SPES_cleanwithouteyes_[pp0009].set'
>             filepath: 'C:\Users\p281582\Documents\Data that needs ICA
> again\'
>              subject: ''
>                group: ''
>            condition: ''
>              session: []
>             comments: 'Original file: SPES0009.eeg'
>               nbchan: 55
>               trials: 1
>                 pnts: 653307
>                srate: 250
>                 xmin: 0
>                 xmax: 2.6132e+03
>                times: [1×653307 double]
>                 data: [55×653307 double]
>               icaact: []
>              icawinv: []
>            icasphere: []
>           icaweights: []
>          icachansind: []
>             chanlocs: [1×55 struct]
>           urchanlocs: []
>             chaninfo: [1×1 struct]
>                  ref: 'averef'
>                event: [1×1916 struct]
>              urevent: [1×1922 struct]
>     eventdescription: {''  ''  ''  ''  ''  ''  ''  ''}
>                epoch: []
>     epochdescription: {}
>               reject: [1×1 struct]
>                stats: [1×1 struct]
>             specdata: []
>           specicaact: []
>           splinefile: ''
>        icasplinefile: ''
>               dipfit: []
>              history: '↵EEG.etc.eeglabvers = '14.1.2'; % this tracks which
> version of EEGLAB is being used, you may ignore it↵EEG =
>                saved: 'yes'
>                  etc: [1×1 struct]
>              datfile: '9_SPES_cleanwithouteyes_[pp0009].fdt'
>
>
> As you can see, there is no information about icasphere, most likely
> because ICA never successfully ran for this participant. When I started
> ICA, it started lowering the learning rate and then getting only to step
> one and then I got the error message, so the ICA was never completed.
>
> However, your suggestion has made me realise that I might have made a
> mistake for some other participants.
>
> Initially I ran my participants in the following way:
>
> > Click on the button ... channels to select all the channels except EOGh
> and EOGvl. The eye electrodes need to be excluded, because they don’t
> have the same reference as the other electrodes in our dataset. The eye
> electrodes are bipolar, meaning that they are referenced to each other. The
> other electrodes, however, are referenced to the average of all electrodes.
>
> However, you advised me not to click on the '...channel' things as this
> might cause some errors. You suggested that I should remove the eye
> electrodes before running ICA and therefore I did not have to click on the
> '...channels' thing. After this advice, I started rejecting my eye
> electrodes before ICA, but for my first participants, I did not. But for
> these first participants, ICA was still successful. Now I am looking back
> at those ICAs and I have discovered that:
>
>
>    1. The number of channels (EEG.nbchan)
>    2. The number of rows in EEG.icasphere *right after* ICA
>
> ....are NOT the same. For instance, for this participant (participant 7)
> 'EEG' gives the following output:
>
> EEG =
>
>   struct with fields:
>
>              setname: 'SPES_clean_ica_[pp0007]'
>             filename: '7_SPES_icacomplete_[pp0007].set'
>             filepath: 'C:\Users\p281582\Documents\Preprocessing_UPDATED\'
>              subject: ''
>                group: ''
>            condition: ''
>              session: []
>             comments: 'Original file: SPES0007.eeg'
>               nbchan: 60
>               trials: 1
>                 pnts: 640153
>                srate: 250
>                 xmin: 0
>                 xmax: 2.5606e+03
>                times: [1×640153 double]
>                 data: [60×640153 double]
>               icaact: [57×640153 double]
>              icawinv: [58×57 double]
>            icasphere: [58×58 double]
>           icaweights: [57×58 double]
>          icachansind: [1×58 double]
>             chanlocs: [1×60 struct]
>           urchanlocs: []
>             chaninfo: [1×1 struct]
>                  ref: 'averef'
>                event: [1×1853 struct]
>              urevent: [1×1922 struct]
>     eventdescription: {''  ''  ''  ''  ''  ''  ''  ''}
>                epoch: []
>     epochdescription: {}
>               reject: [1×1 struct]
>                stats: [1×1 struct]
>             specdata: []
>           specicaact: []
>           splinefile: ''
>        icasplinefile: ''
>               dipfit: []
>              history: '↵EEG.etc.eeglabvers = '14.1.2'; % this tracks which
> version of EEGLAB is being used, you may ignore it↵EEG =
>                saved: 'yes'
>                  etc: [1×1 struct]
>              datfile: '7_SPES_icacomplete_[pp0007].fdt'
>
> As you can see, nbchan = 60 but icasphere is 58 (i.e., the second
> dimension of the n x m matrix; m IS NOT the same as the number of channels).
>
> So do you think I should run ICA again for these participants where the
> two variables nbchan and icasphere are not the same?
>
> To summarize. I have two issues:
> 1) For participant 9, ICA was not successful and during running ICA it
> only got until step one where I got the error message. Therefore, there is
> no information about the variable icasphere.
> 2) With your suggestion, I checked again for all my participants whether
> nbchan and icasphere are the same, I discovered that for the ones that I
> did not exclude the eye electrode before ICA and where I clicked on the
> '...channel' thing, I got ICA where the number of channels is NOT equal to
> icasphere. Do you think I should run ICA again for these participants where
> number of channels is NOT equal to icasphere?
>
> Hopefully you can still follow the story here, if you have any questions
> about what I mean, please ask them. I tried to explain it as clear as
> possible but it's sometimes hard to do so via email.
>
> Thanks again Makoto, you are a great help with all of this!
>
> Best,
> Edwige
>
>
>
>
> On Wed, Jul 11, 2018 at 8:35 PM, Makoto Miyakoshi <mmiyakoshi at ucsd.edu>
> wrote:
>
>> Dear Edwige,
>>
>> > I have no idea what this means and at this point I am quite desperate
>> because I really need this participant…
>>
>> Don't worry Edwige, this data will be fine.
>> In the worst case, you can still send it to me for re-processing.
>>
>> > 1: the number of channels is: 55
>>
>> Ok it means you do have 55 channels.
>>
>> > 2: the number of rows is I think: 53 (?)
>>
>> Sorry, I should have asked you to do it in this way: Could you please
>> copy and paste all the output from typing 'EEG'? It's like this.
>>
>> EEG =
>>
>>              setname: '5022'
>>             filename: '5022.set'
>>             filepath: '/data/data/data/data/data/data/data'
>>              subject: '5022'
>>                group: ''
>>            condition: ''
>>              session: []
>>             comments: ''
>>               nbchan: 128
>>               trials: 1
>>                 pnts: 540914
>>                srate: 250
>>                 xmin: 0
>>                 xmax: 2.1637e+03
>>                times: [1x540914 double]
>>                 data: [128x540914 single]
>>               icaact: [123x540914 single]
>>              icawinv: [128x123 double]
>>            icasphere: [123x128 double]
>>           icaweights: [123x123 double]
>>          icachansind: [1x128 double]
>>             chanlocs: [1x128 struct]
>>           urchanlocs: []
>>             chaninfo: [1x1 struct]
>>                  ref: 'averef'
>>                event: [1x1096 struct]
>>              urevent: [1x1015 struct]
>>     eventdescription: {''  ''  ''  ''}
>>                epoch: []
>>     epochdescription: {}
>>               reject: [1x1 struct]
>>                stats: [1x1 struct]
>>             specdata: []
>>           specicaact: []
>>           splinefile: ''
>>        icasplinefile: ''
>>               dipfit: [1x1 struct]
>>              history: [1x432 char]
>>                saved: 'yes'
>>                  etc: [1x1 struct]
>>              datfile: '5022.fdt'
>>
>>
>> I made a mistake, I should have asked to tell me the number of columns
>> instead of rows (i.e., the second dimension of the n x m matrix; m must be
>> the same as the number of channels).
>>
>> Makoto
>>
>>
>>
>> On Tue, Jul 10, 2018 at 1:56 AM E. Sijyeniyo <e.sijyeniyo at student.rug.nl>
>> wrote:
>>
>>> Dear Makoto,
>>>
>>> I have been spending some time now trying to figure out what your
>>> suggestion means, but I am afraid I don’t really understand what you mean.
>>>
>>> In our previous correspondence you answered the following:
>>>
>>> “*You mean this error message again?*
>>>
>>>
>>> *"eeg_checkset error: number of elements in ‘icachansind’ (55) does not
>>> match the number of columns in the sphere array (54). Should EEGlab remove
>>> ICA information (press cancel to fix the problem from the command line)”. *
>>>
>>> *That's pretty strange...*
>>> *One think you can try quickly is that when you use infomax, use 'pca',
>>> 58; If your current number of channels is 60, you try 59, 58, 57... I'm
>>> testing here the possibility of dimension reduction happened to your data
>>> in an unexpected reason.*
>>>
>>> *EEG.icasphere has the dimension of the data decomponsed and the number
>>> of channels used, where nbchan >= data rank. When this is equal, it is
>>> called 'full rank' which is the basic assumption. Runica() has its own rank
>>> detection stage to estimate the right rank of the data, which sometimes
>>> fails.*
>>>
>>>
>>> *I still suspect that some type of user operation caused the channel
>>> inconsistency. Are you sure you did not do any channel manipulation after
>>> ICA?*
>>>
>>> *Makoto*”
>>>
>>> I typed in what you suggested:
>>>
>>> Sorry for the trouble.
>>> I want to know
>>>
>>>    1. The number of channels (EEG.nbchan)
>>>    2. The number of rows in EEG.icasphere *right after* ICA
>>>
>>> 1: the number of channels is: 55
>>> 2: the number of rows is I think: 53 (?) I get  a lot of data with zeros
>>> and the last bit of data says: Colums 53 through 55.
>>>
>>> I have no idea what this means and at this point I am quite desperate
>>> because I really need this participant…
>>>
>>> Thank you.
>>>
>>> Best,
>>> Edwige
>>>
>>>
>>>
>>>
>>> On Wed, Jul 4, 2018 at 12:58 AM E. Sijyeniyo <e.sijyeniyo at student.rug.nl>
>>> wrote:
>>>
>>>> Dear Makoto,
>>>>
>>>> I performed ICA on the dataset on which I got the error message, this
>>>> time I excluded the EOG channels before ICA and therefore I didn’t click on
>>>> the "…channels thing". However, surprisingly, I  received the same error
>>>> again.
>>>>
>>>> Now I really don’t know what might have gone wrong.
>>>>
>>>> Any insights on this?
>>>>
>>>> Thank you so much for your time!
>>>>
>>>> Best,
>>>> Edwige
>>>>
>>>> Op 3 jul. 2018, om 19:43 heeft Makoto Miyakoshi <mmiyakoshi at ucsd.edu>
>>>> het volgende geschreven:
>>>>
>>>> Dear Edwige,
>>>>
>>>> My guess is that that's a bug in EEGLAB and caused by using that
>>>> 'channels' thing.
>>>>
>>>> > Click on the button ... channels to select all the channels except
>>>> EOGh and EOGvl. The eye electrodes need to be excluded, because they
>>>> don’t have the same reference as the other electrodes in our dataset. The
>>>> eye electrodes are bipolar, meaning that they are referenced to each other.
>>>> The other electrodes, however, are referenced to the average of all
>>>> electrodes.
>>>>
>>>> This kind of thing is poorly supported. I'm pretty sure that if you
>>>> don't do it, it'll run fine. Try it.
>>>>
>>>> If you don't include channels to ICA, what's the point of having
>>>> channels... that's our way of thinking. So, if you can't include the EOG
>>>> channels, reject them before ICA. Eye blinks and saccades are the things
>>>> ICA can detect most dramatically, so withouot EOG channels it'll be done
>>>> fine--I have absolutely no worry there.
>>>>
>>>> By the way I like your name contains 'ewig'. Nice name.
>>>>
>>>> *Weh spricht 'Vergeh!'*
>>>> *Doch alle Lust will Ewigkeit,*
>>>> *will tiefe tiefe Ewigkeit!*
>>>>
>>>> Makoto
>>>>
>>>> On Tue, Jul 3, 2018 at 5:04 AM E. Sijyeniyo <e.sijyeniyo at student.rug.nl>
>>>> wrote:
>>>>
>>>>> Dear Makoto,
>>>>>
>>>>> I tried running ICA for a dataset. Since now: I have been doing this
>>>>> in this order:
>>>>>
>>>>>    - Go to Tools > Run ICA
>>>>>    - Set ICA algorithm to use to runica
>>>>>    - Click on the button ... channels to select all the channels
>>>>>    except EOGh and EOGvl. The eye electrodes need to be excluded, because they
>>>>>    don’t have the same reference as the other electrodes in our dataset. The
>>>>>    eye electrodes are bipolar, meaning that they are referenced to each other.
>>>>>    The other electrodes, however, are referenced to the average of all
>>>>>    electrodes.
>>>>>    - Set the Commandline options to ‘extended’, 1, ‘pca’, [number of
>>>>>    channels -3] (Two of these three channels are the eye electrodes
>>>>>    that you excluded. The third channel needs to be subtracted because we used
>>>>>    average reference, which changes the rank of the data.)
>>>>>    - Click Ok
>>>>>
>>>>> Based on your tutorial, I do not include the eye electrodes in since
>>>>> they were not included in the average reference: see
>>>>>
>>>>>    - Include EOG, ECG, and other channels as long as they share the
>>>>>    initial reference electrode with scalp electrodes. If EOG channels are
>>>>>    referenced to each other (i.e., bipolar), *exclude them.*
>>>>>
>>>>>
>>>>> This procedure went well and I have been able to get ICs for 6
>>>>> participants. However, I have done the exact procedure but now I get the
>>>>> warning:
>>>>> *"eeg_checkset error: number of elements in ‘icachansind’ (55) does
>>>>> not match the number of columns in the sphere array (54). Should EEGlab
>>>>> remove ICA information (press cancel to fix the problem from the command
>>>>> line)”. *
>>>>>
>>>>> What does this error mean? I have looked online, but I can't seem to
>>>>> find what I have done wrong especially because all other datasets went well
>>>>> with the same procedure….
>>>>>
>>>>> I can definitely use your expertise on this issue.
>>>>>
>>>>> Thank you so much in advance.
>>>>>
>>>>> Best,
>>>>> Edwige
>>>>>
>>>>> Op 27 jun. 2018, om 09:53 heeft E. Sijyeniyo <
>>>>> e.sijyeniyo at student.rug.nl> het volgende geschreven:
>>>>>
>>>>> Dear Makoto,
>>>>>
>>>>> Thank you very much for your response! Ok, now I know for sure that I
>>>>> don’t have to reject these channels!
>>>>>
>>>>>
>>>>> Best,
>>>>> Edwige
>>>>>
>>>>> Op 26 jun. 2018, om 20:02 heeft Makoto Miyakoshi <mmiyakoshi at ucsd.edu>
>>>>> het volgende geschreven:
>>>>>
>>>>> Dear Edwige,
>>>>>
>>>>> I don't recommend to reject alpha. Alpha is a great brain component
>>>>> and explains most part of early visual potentials, for example. If you run
>>>>> ICA, it will nicely decompose it.
>>>>>
>>>>> > a second year research master student
>>>>>
>>>>> Very good! Good luck.
>>>>>
>>>>> Makoto
>>>>>
>>>>> On Tue, Jun 26, 2018 at 10:06 AM E. Sijyeniyo <
>>>>> e.sijyeniyo at student.rug.nl> wrote:
>>>>>
>>>>>> Dear Makoto,
>>>>>>
>>>>>> I am Edwige Sijyeniyo, a second year research master student in
>>>>>> Language and Cognition at the University of Groningen (the Netherlands).
>>>>>>
>>>>>> Currently, I am preprocessing my EEG data that I collected for my
>>>>>> thesis project (name of project: Syntactic Priming in Comprehension).
>>>>>>
>>>>>> I am following some of your steps at:
>>>>>> https://sccn.ucsd.edu/wiki/Makoto%27s_preprocessing_pipeline#To_learn_how_to_evaluate_EEG_and_artifact_ICs_.2801.2F24.2F2017_updated.29
>>>>>>
>>>>>>
>>>>>> I had a question regarding interpolation of bad channels, some
>>>>>> participants show a lot of alpha waves (especially in the posterior
>>>>>> electrodes like PO9, PO10, PO7, PO8 etc). I was wondering whether channels
>>>>>> that contain a lot of alpha waves can be interpolated, therefore marking
>>>>>> these channels as noisy
>>>>>>
>>>>>> Would alpha waves distort the data to a large extent if these are not
>>>>>> interpolated?
>>>>>>
>>>>>> Thank you so much for your time and am looking forward to your
>>>>>> response!
>>>>>>
>>>>>> Best,
>>>>>> Edwige
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> Makoto Miyakoshi
>>>>> Swartz Center for Computational Neuroscience
>>>>> Institute for Neural Computation, University of California San Diego
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> Makoto Miyakoshi
>>>> Swartz Center for Computational Neuroscience
>>>> Institute for Neural Computation, University of California San Diego
>>>>
>>>>
>>>>
>>>
>>>
>>> Op 6 jul. 2018, om 21:03 heeft Makoto Miyakoshi <mmiyakoshi at ucsd.edu>
>>> het volgende geschreven:
>>>
>>> Dear Edwige,
>>>
>>> Sorry for the trouble.
>>> I want to know
>>>
>>>    1. The number of channels (EEG.nbchan)
>>>    2. The number of rows in EEG.icasphere *right after* ICA
>>>
>>> They should match. If they don't, it must be EEGLAB bug--in that case,
>>> we may need to ask you to send us the dataset. Let us know what you get.
>>>
>>> Makoto
>>>
>>> On Fri, Jul 6, 2018 at 10:32 AM E. Sijyeniyo <e.sijyeniyo at student.rug.nl>
>>> wrote:
>>>
>>>> Dear all,
>>>>
>>>> While running ICA for one of my participants, I received the following
>>>> error message:
>>>>
>>>> *"eeg_checkset error: number of elements in ‘icachansind’ (55) does not
>>>> match the number of columns in the sphere array (54). Should EEGlab remove
>>>> ICA information (press cancel to fix the problem from the command line)”. *
>>>>
>>>> I have done the preprocessing procedure for this participant the same
>>>> way in which I have done others. However, for my other participants, I did
>>>> not get this message, only for this one participant.
>>>>
>>>> What I typed in the *Commandline* after selecting for runica is ->  ‘extended’,
>>>> 1, ‘pca’, [number of channels -1] (-1 is because I used average
>>>> reference which changes the rank of the data).
>>>>
>>>> Does anyone know what this error mean? I tried running ICA for the same
>>>> participant again, but I keep getting the same error…could this be a bug?
>>>>
>>>> Thank you so much in advance!
>>>>
>>>> Best,
>>>> Edwige
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>>
>>>
>>>
>>> --
>>> Makoto Miyakoshi
>>> Swartz Center for Computational Neuroscience
>>> Institute for Neural Computation, University of California San Diego
>>>
>>>
>>>
>>>
>>
>> --
>> Makoto Miyakoshi
>> Swartz Center for Computational Neuroscience
>> Institute for Neural Computation, University of California San Diego
>>
>
>

-- 
Makoto Miyakoshi
Swartz Center for Computational Neuroscience
Institute for Neural Computation, University of California San Diego
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20180712/6d9dbd55/attachment.html>


More information about the eeglablist mailing list