[Eeglablist] bad channel rejection - kurtosis - threshold limits default 5

Makoto Miyakoshi mmiyakoshi at ucsd.edu
Wed Feb 20 19:04:42 PST 2013


Dear Ida,

> Yes, for me it is very important to to lose the freq range of breathing.

How can you accurately measure 0.13-0.35 Hz activity with epochs shorter
than 7.7 sec long? Isn't it theoretical requirement to have at least
1(sec)/0.13(Hz) = 7.7 sec long window to calculate 0.13 Hz?

> Now I installed V12.0.1.0b and will use as *the first step* Tools-->Basic
FIR filter (new) with lower edge input as 0.1 Hz (range is from 0.1 - 0.35
Hz) which uses  pop_eegfiltnew() .

Looks fine.

> I installed a plug in you suggested (cleanline) and there is still no
Help provided,

Sorry that's most likely a bug. I know it's been while since I had noticed
it. I reported it to Arno. Meanwhile, type 'help cleanline' in the comannd
window please. You can pretty much use the default anyway.

> *Fourth step - * epoching: Freq of my interest is 0.13-0.35, but markers
of interesting events are put manually (depending on value on additional
pressure sensor measuring inhalation and exhalation). I often have
considerable epochs overlapping (even 2 markers within one epoch) if I use
larger range than [-3,2] so I suppose it is better not to have a large
overlap. 7.7 sec long epoch would result very large overlap. Only I can do
to avoid it is to erase markers, but than I will lose a lot of data.

As I wrote above, I'm very concerned with this. To capture a single cycle
of 0.13 Hz sinusoid you need at least 7.7 sec. Think about it again.

> Is there any paper suggesting the limits of parameters of ICs that are
required for the methods in this dialog box (for finding abnormal values,
trends, impropable data, abnormal distributions, abnormal spectra)?

What do you mean by 'limits of parameters'? In the Delorme et al. (2007) it
says 'total number of epochs to be rejected should be around 10%' and
that's it. It's up to you what criteria  to use to judge 'good' or 'bad'.
Again, I recommend you should not overtrust kurtosis nor improbability. Use
it moderately.

Makoto

2013/2/20 ida miokovic <ida.miokovic at gmail.com>

> Dear Makoto,
>
> Yes, for me it is very important to to lose the freq range of breathing.
> I am using EEGLAB version V11.0.1.1b and with "Tools --> Filter the data
> --> Basic FIR filter" data is filtered with pop_eegfilt function (fir1 is
> checked).
> Now I installed V12.0.1.0b and will use as *the first step* Tools-->Basic
> FIR filter (new) with lower edge input as 0.1 Hz (range is from 0.1 - 0.35
> Hz) which uses  pop_eegfiltnew() .
>
> I installed a plug in you suggested (cleanline) and there is still no Help
> provided, so I am not sure how to set the parameters in the pop up window
> (p, bandwith (what would be realistic value?), sliding window length and
> step size, window overlap smoothing factor, FFT padding factor)? Can I
> leave it default? What is a suggested range if I would like to remove 50Hz
> noise? Is 48 - 52 Hz too sharp? I would use this as *the second step.* Although,
> I read that it is possible that ICA finds this line noise, so if I do not
> understand these parameters, I could skip this step.
>
> I will definitly *skip the step of automatical removal of bad channels*and try with your suggestion and use standard deviation:
>
> stdData = std(EEG.data,0,2);
>
> figure; bar(stdData)
>  *Third step* would be re-reference to the average reference.
> *Fourth step - * epoching: Freq of my interest is 0.13-0.35, but markers
> of interesting events are put manually (depending on value on additional
> pressure sensor measuring inhalation and exhalation). I often have
> considerable epochs overlapping (even 2 markers within one epoch) if I use
> larger range than [-3,2] so I suppose it is better not to have a large
> overlap. 7.7 sec long epoch would result very large overlap. Only I can do
> to avoid it is to erase markers, but than I will lose a lot of data.
>
> *Fifth step* would be running ICA for the first time.
> *Sixth step* would be this semi-automatic rejection of bad epochs
> (recommended to be done on ICs) with Tools-->Reject data using ICA-->Reject
> data (all methods). I saw in Tutorial that *"The user should begin by
> visually rejecting epochs from some test data, then adjust parameters for
> one or more of the rejection measures, comparing the visually selected
> epochs with the results of the rejection measure. All the measures can
> capture both simulated and real data artifacts. In our experience, the most
> efficient measures seem to be frequency threshold and linear trend
> detection."*. Is there any paper suggesting the limits of parameters of
> ICs that are required for the methods in this dialog box (for finding
> abnormal values, trends, impropable data, abnormal distributions, abnormal
> spectra)?
>
> As* the last step -* ICA will be re-run and components visually
> inspected/selected/removed.
>
> Your guidelines helped me a lot to see what have been my mistakes in my
> procedure by now. I am very grateful for your help.
>
> All the best,
>
> Ida
>
>
>
>
>
>
> On Mon, Feb 18, 2013 at 7:37 PM, Makoto Miyakoshi <mmiyakoshi at ucsd.edu>wrote:
>
>> Dear Ida,
>>
>> > 1. Highpass 0.1 Hz FIR filter (the frequency of my interest is very low
>> breathing frequency 0.13 - 0. 35 Hz)
>>
>> OK, I noticed that filter is very important for you. Make sure that you
>> used pop_eegfiltnew() or firfilt(). See also
>> http://sccn.ucsd.edu/wiki/Firfilt_FAQ. Please let me know if the latest
>> version of EEGLAB DOES NOT have pop_eegfiltnew().
>>
>> > 2. Notch short bandpass IIR 48 – 52 Hz filter for line noise removal
>>
>> Do not use notch since we have much better solution. Check this out.
>>
>> http://www.nitrc.org/projects/cleanline/
>>
>> > 3.* Automatic rejection of bad channels (Kurtosis,5) --> *Is it a
>> problem if the automatic rejection is done on continuous data?
>>
>> It depends on how clean the data need to be. In general, kurtosis is
>> easily affected by outliers. If no data rejection is done, kurtosis may not
>> be the best choise. I would start with simple code such as
>>
>> stdData = std(EEG.data,0,2);
>>
>> figure; bar(stdData)
>>
>> If you find bad channel in this bargraph you may wan to check them
>> visually to make decision. If you have too many data to eyeball, you may
>> need to write a code to loop this.
>>
>> > 4. re-referencing data to the average reference
>>
>> This seems fine.
>>
>> > 5. Epoching data around the markers of interest in segment [-3 2],
>> baseline removal -3000 -2000 (ms).
>>
>> If your freq of intrest is 0.13-0.35, then you should have at least 7.7
>> sec long (longer is better) for a epoch to obtain spectra at 0.13 Hz (I
>> could be wrong in guessing what you want to do).
>>
>> > What is wrong with rejecting componenets by map after first ICA?
>>
>> http://sccn.ucsd.edu/eeglab/eeglabfaq.html
>>
>> *Re-running ICA*
>>
>> *Question:* While trying within EEGLAB to remove artifacts using ICA, I
>> had trouble in recalculating an ICA decomposition after removing
>> components. I tried to follow the guidelines in the tutorial, thinking that
>> with fuzzy components it might work better to remove some clear artifact
>> components first and the run a new ICA. When I tried to do that, the second
>> ICA always took much longer and I got also some error message in the end
>> telling me, that there was something wrong with the result.
>>
>> *Answer:* The standard procedure we advise is first to perform ICA on
>> the data and to remove bad trials using the ICA component activities. If
>> you remove ICA components, the rank of the data will decrease (to <nchans).
>> If the data have n channels, the rank of the data is (most probably) n. If
>> you remove one component it will become n-1, and ICA will not be able to
>> find n components in the pruned data). Thus, as a first step, you should
>> only remove bad trials. This procedure will not alter the dimensionality of
>> the data. As a second step, recompute ICA and remove bad components (the
>> second run of ICA should result in clearer artifact components (for
>> instance muscle at high frequencies), not contaminated by strong outlier
>> trials. If you remove ICA components and want to re-run ICA, you must
>> decompose the data with the 'pca' option to reduce the dimensionality of
>> the decomposition to match the data rank (see below).
>>
>> > I performed this rejection (step 3) and among 121 channels, around 10
>> (+-2) of them were rejected. Is it too much?
>> I think that' fine.
>>
>> > Here, you mean to adjust the threshold value of the Kurtosis to end up
>> with around 10% of the data to be rejected by this automatic method?
>>
>> No. I meant in epoch rejection around 10% would be ok, not the number of
>> channels.
>>
>> > Could you please help me with what would be functions/commands for this
>> in EEGLAB and would this be acceptable on contiuous channel or only epoched?
>>
>> In the current EEGLAB continuous data can be rejected only by eyes. If
>> you don't mind chopping up your data into epochs, check out eeg_regepochs().
>>
>> > Somehow I have troubles finding it...could you please mail me the link
>> to it?
>>
>> Delorme, A., Sejnowski, T., Makeig, S. (2007) Improved rejection of
>> artifacts from EEG data using high-order statistics and independent
>> component analysis. *Neuroimage*, 34, 1443-1449.
>>
>> > Thank you for these encouraging words. If I understood you correctly,
>> you are suggesting me to try run ICA after this automatic bad channels (in
>> your case epochs) rejection but with thresholds of the Kurtosis 5, 10, 15?
>> If not, what do you mean by rejection rate of the data?
>>
>> Again I mean the number of epochs. In the guideline paper (Picton et al.,
>> 2000) it is stated that rejecting more than 30% of epochs may be a bad idea
>> if the data were recorded from healthy adults.
>>
>> Makoto
>>
>> 2013/2/17 ida miokovic <ida.miokovic at gmail.com>
>>
>>> Dear Makoto,
>>>
>>> thank you very much for your response.
>>>
>>> Actually, I performed Automatic rejection of bad channels on continuous
>>> data. The steps that lead to ICA decomposition were:
>>>
>>> 1. Highpass 0.1 Hz FIR filter (the frequency of my interest is very low
>>> breathing frequency 0.13 - 0. 35 Hz)
>>>
>>> 2. Notch short bandpass IIR 48 – 52 Hz filter for line noise removal
>>>
>>> 3.* Automatic rejection of bad channels (Kurtosis,5) --> *Is it a
>>> problem if the automatic rejection is done on continuous data?
>>>
>>> 4. re-referencing data to the average reference
>>>
>>> 5. Epoching data around the markers of interest in segment [-3 2],
>>> baseline removal -3000 -2000 (ms).
>>>
>>> 6. Run ICA for the first time, reject bad ICs (by rejecting componenets
>>> by map), run ICA for the second time. --> I found your answer regarding the
>>> same issue:
>>>
>>> *If you want to obtain better ICA solution, what you should actually do*
>>>
>>> >* is to click 'Tools - Reject data using ICA - Reject data (all*>* methods)' and not 'Reject components by map'. You may have run epoch*>* rejection before running ICA. Similarly, you can run the same epoch*>* rejection after ICA on IC activities. If you want to know why and how*>* epoch rejection on IC activity is effective compared to raw EEG data,*
>>>
>>> What is wrong with rejecting componenets by map after first ICA?
>>>
>>> > Start with 5 and see the results. If it catches too many epochs, then
>>> > increase the value. I would use 8-10.
>>> I performed this rejection (step 3) and among 121 channels, around 10
>>> (+-2) of them were rejected. Is it too much?
>>>
>>> > Adjust them so that the sum of epochs suggested by your rejection
>>> > methods ends up with around 10 % of the data.
>>>
>>> Here, you mean to adjust the threshold value of the Kurtosis to end up
>>> with around 10% of the data to be rejected by this automatic method? I
>>> obtained that with Kurtosis threshold 5 (max 12 channels out of 121 were
>>> rejected).
>>>
>>> > I would recommend that you simply threshold the data by amplitude
>>> > first (+/- 150-200 microvolt, for example) to exclude undoubtedly
>>> > wrong epochs due to loose channel etc (select up to 1% of data- but be
>>> > careful not to catch eye blinks), then apply probability method
>>> > (select up to 3-5% of data). You may think the data is not clean yet,
>>> > but apply ICA anyway, and do rejections on IC activities to select
>>> > another up to 5% of epochs if you want.
>>>
>>> Could you please help me with what would be functions/commands for this
>>> in EEGLAB and would this be acceptable on contiuous channel or only epoched?
>>>
>>> > Delorme et al. 2007 NeuroImage for epoch rejection using EEGLAB tools.
>>>
>>> Somehow I have troubles finding it...could you please mail me the link
>>> to it?
>>>
>>>
>>> > My general impression is that people spend too much time on
>>> data cleaning (especially psychologists; I've seen this because I'm
>>> a psychologist).   > ICA decomposition is in many cases more robust than
>>> you think. If you want to prove it, try ICA with rejection rate of 5%, 10%,
>>> and 15%. I'll bet you > don't see much (or even any) difference in IC topos
>>> and spectra as long as you recorded the data in an ordinary laboratory
>>> environment. So don't be  > too nervous.
>>>
>>> Thank you for these encouraging words. If I understood you correctly,
>>> you are suggesting me to try run ICA after this automatic bad channels (in
>>> your case epochs) rejection but with thresholds of the Kurtosis 5, 10, 15?
>>> If not, what do you mean by rejection rate of the data?
>>>
>>> Thank you very much in advance...Your help means a lot.
>>>
>>> All the best.
>>>
>>> Ida
>>> On Mon, Feb 11, 2013 at 7:54 PM, Makoto Miyakoshi <mmiyakoshi at ucsd.edu>wrote:
>>>
>>>> Dear Ida,
>>>>
>>>> > I didn't pay much attention to it assuming
>>>> > that the default settings are the most common ones.
>>>>
>>>> Not necessarily so. These parameters depend on your data quality.
>>>>
>>>> > - Why is 5 default value for the max threshold limits? I read
>>>> explanation of
>>>> > the function jointprob() where it says that the threshold is
>>>> expressed in
>>>> > standard deviation of the mean.
>>>>
>>>> Start with 5 and see the results. If it catches too many epochs, then
>>>> increase the value. I would use 8-10.
>>>>
>>>> > - What would be the easiest way to calculate the standard deviation
>>>> of the
>>>> > mean of my dataset and would that result be the threshold that is
>>>> > appropriate to my dataset?
>>>>
>>>> Adjust them so that the sum of epochs suggested by your rejection
>>>> methods ends up with around 10 % of the data.
>>>>
>>>> > - Are there situation when it is better to use Kurtosis rather than
>>>> the
>>>> > probability measure and the other way around?
>>>>
>>>> You should see what type of artifacts are picked up by what methods.
>>>> Generally, kurtosis is too sensitive to outliers. The probability
>>>> measure sometimes picks up large alpha. Both have problems, so don't
>>>> completely rely on them. Use them mildly.
>>>>
>>>> I would recommend that you simply threshold the data by amplitude
>>>> first (+/- 150-200 microvolt, for example) to exclude undoubtedly
>>>> wrong epochs due to loose channel etc (select up to 1% of data- but be
>>>> careful not to catch eye blinks), then apply probability method
>>>> (select up to 3-5% of data). You may think the data is not clean yet,
>>>> but apply ICA anyway, and do rejections on IC activities to select
>>>> another up to 5% of epochs if you want.
>>>>
>>>> See also Delorme et al. 2007 NeuroImage for epoch rejection using
>>>> EEGLAB tools. This is an excellent guide for you.
>>>>
>>>> My general impression is that people spend too much time on data
>>>> cleaning (especially psychologists; I've seen this because I'm a
>>>> psychologist). ICA decomposition is in many cases more robust than you
>>>> think. If you want to prove it, try ICA with rejection rate of 5%,
>>>> 10%, and 15%. I'll bet you don't see much (or even any) difference in
>>>> IC topos and spectra as long as you recorded the data in an ordinary
>>>> laboratory environment. So don't be too nervous.
>>>>
>>>> Makoto
>>>>
>>>> 2013/2/9 ida miokovic <ida.miokovic at gmail.com>:
>>>> > Dear eeglab list,
>>>> >
>>>> > after performing some analysis on the eeg dataset I have, I noticed
>>>> that in
>>>> > "Bad channels rejection" step I used Kurtosis measure, normalize
>>>> measure
>>>> > checked and the max threshold limits remained set on 5 (by the
>>>> default). At
>>>> > the time of performing this step, I didn't pay much attention to it
>>>> assuming
>>>> > that the default settings are the most common ones. Now, when
>>>> explaining to
>>>> > the detail each step of my analysis, I'm stuck here.
>>>> >
>>>> > - Why is 5 default value for the max threshold limits? I read
>>>> explanation of
>>>> > the function jointprob() where it says that the threshold is
>>>> expressed in
>>>> > standard deviation of the mean.
>>>> >
>>>> > - What would be the easiest way to calculate the standard deviation
>>>> of the
>>>> > mean of my dataset and would that result be the threshold that is
>>>> > appropriate to my dataset?
>>>> >
>>>> > - Are there situation when it is better to use Kurtosis rather than
>>>> the
>>>> > probability measure and the other way around?
>>>> >
>>>> > Thank you very much for your help and I apologize in advance if you
>>>> find
>>>> > these questions too simple...
>>>> >
>>>> > Ida
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > _______________________________________________
>>>> > 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
>>>> JSPS Postdoctral Fellow for Research Abroad
>>>> Swartz Center for Computational Neuroscience
>>>> Institute for Neural Computation, University of California San Diego
>>>>
>>>
>>>
>>
>>
>> --
>> Makoto Miyakoshi
>> JSPS Postdoctral Fellow for Research Abroad
>> Swartz Center for Computational Neuroscience
>> Institute for Neural Computation, University of California San Diego
>>
>
>
> _______________________________________________
> 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
JSPS Postdoctral Fellow for Research Abroad
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/20130220/9c581f95/attachment.html>


More information about the eeglablist mailing list