[Eeglablist] Inconsistent results using clean_artifacts

Delorme, Arnaud adelorme at ucsd.edu
Tue Apr 14 13:47:57 PDT 2020


Dear Yarden,

I have tried to use only the ChannelCriterion. I have run this rejection only on the tutorial dataset (rejecting 17 channels) and I obtained the exact same result 20 times in a row.

EEGNEW = clean_artifacts(EEG, 'FlatlineCriterion','off','ChannelCriterion',0.98,'LineNoiseCriterion','off','Highpass','off','BurstCriterion','off','WindowCriterion','off','BurstRejection','off','Distance','Euclidian’);

Would you mind to share a dataset and the exact command you use that create problems.

Best wishes,

Arno

> On Apr 11, 2020, at 11:32 AM, Yarden Ben Horin <benhoriy at post.bgu.ac.il> wrote:
> 
> Dear Arno,
> 
> Thank you for your reply. First of all, we made sure we all work with the latest versions of eeglab and clean_rawdata. (you may find a snippet from eeglab loading below.)
> We had continued digging into the problem and found that the option that causes the inconsistent results is 'ChannelCriterion'  ("min acceptable correlation between nearby channels"). When we set it to 0.8 the clean_artifacts start behaving randomly (removing different channels at every run). We turned this option off and it seems that  clean_artifacts works as expected, though we would like to use this feature.
> 
> One more thing. Before we use clean_artifacts we run:
> EEG = pop_rmdat( EEG, {'3' '8' '9'},[-4 0.06] ,0); % cutting data by event
> 
> and we get the following output:
> eeg_insertbound(): 99 boundary (break) events added.
> eeg_checkset note: upper time limit (xmax) adjusted so (xmax-xmin)*srate+1 = number of frames
> Warning: converting all event types to strings
> eeg_insertbound(): 99 boundary (break) events added.
> BUG 1971 WARNING: IF YOU ARE USING A SCRIPT WITTEN FOR A PREVIOUS VERSION OF EEGLAB (<2017)
> TO CALL THIS FUNCTION, BECAUSE YOU ARE REJECTING THE ONSET OF THE DATA, EVENTS MIGHT HAVE
> BEEN CORRUPTED. EVENT LATENCIES ARE NOW CORRECT (SEE https://sccn.ucsd.edu/wiki/EEGLAB_bug1971);
> 
> When we run clean_artifacts just after and turn 'ChannelCriterion' on we get some warnings (I removed "clean_channel:   1/79 blocks, 0.1 minutes remaining." rows):   
> Scanning for bad channels...
> clean_channel:   1/79 blocks, 0.1 minutes remaining.
> ...
> clean_channel:  79/79 blocks, 0.0 minutes remaining.
> Removing 5 channel(s)...
> Finding a clean section of the data...
> Determining time window rejection thresholds...done.
> Keeping 34.3% (137 seconds) of the data.
> eeg_insertbound(): 99 boundary (break) events added.
> eeg_insertbound(): event latencies recomputed and 203 events removed.
> eeg_checkset note: upper time limit (xmax) adjusted so (xmax-xmin)*srate+1 = number of frames
> Warning: duplicate boundary event removed
> eeg_insertbound(): 99 boundary (break) events added.
> eeg_insertbound(): event latencies recomputed and 206 events removed.
> BUG 1971 WARNING: IF YOU ARE USING A SCRIPT WITTEN FOR A PREVIOUS VERSION OF EEGLAB (<2017)
> TO CALL THIS FUNCTION, BECAUSE YOU ARE REJECTING THE ONSET OF THE DATA, EVENTS MIGHT HAVE
> BEEN CORRUPTED. EVENT LATENCIES ARE NOW CORRECT (SEE https://sccn.ucsd.edu/wiki/EEGLAB_bug1971);
> Warning: Discrepency when recomputing event latency.
> Try to reproduce the problem and send us your dataset 
> > In eeg_eegrej (line 173)
>   In pop_select (line 553)
>   In clean_windows (line 137)
>   In clean_asr (line 146)
>   In clean_artifacts (line 233)
>   In Utils.DS.ASRCleaning (line 9)
>   In Pipeline (line 101) 
> Warning: Inconsistency in boundary event duration.
> Try to reproduce the problem and send us your dataset 
> > In eeg_eegrej (line 188)
>   In pop_select (line 553)
>   In clean_windows (line 137)
>   In clean_asr (line 146)
>   In clean_artifacts (line 233)
>   In Utils.DS.ASRCleaning (line 9)
>   In Pipeline (line 101) 
> Estimating calibration statistics; this may take a while...
> Determining per-component thresholds...done.
> Now cleaning data in 25 blocks.........................
> Use vis_artifacts to compare the cleaned data to the original.
> 
> 
>  Hope this helps, and have a great weekend.
> Yarden.
> 
> 
> eeglab loading:
> 
> [ALLEEG EEG CURRENTSET ALLCOM] = eeglab;
> Some menus items hidden. Use Preference menu to show them all.
> eeglab: options file is C:\Users\Yarden\eeg_options.m
> Retrieving plugin versions from server...
> Retreiving download statistics...
> EEGLAB: adding "CleanLine" v1.04 (see >> help eegplugin_cleanline)
> EEGLAB: adding "ICLabel" v1.2.5 (see >> help eegplugin_iclabel)
> EEGLAB: adding "biosig4octmat-" to the path; subfolders (if any) might be missing from the path
> EEGLAB: adding "clean_rawdata" v2.1 (see >> help eegplugin_clean_rawdata)
> EEGLAB: adding "dipfit" v3.3 (see >> help eegplugin_dipfit)
> EEGLAB: adding "firfilt" v2.4 (see >> help eegplugin_firfilt)
> You are using the latest version of EEGLAB.
> 
> 
> 
> 	בלי וירוסים. www.avast.com
> 
> ‫בתאריך יום ה׳, 9 באפר׳ 2020 ב-10:26 מאת ‪Delorme, Arnaud‬‏ <‪adelorme at ucsd.edu‬‏>:‬
> Dear Yarden,
> 
> Are you sure you are using the latest version of the clean_rawdata (v2.1) https://github.com/sccn/clean_rawdata
> Slight difference due to memory available has been removed by default in this version.
> 
> Let us know. I have just tried ASR with this version twice on the same dataset and got identical results.
> 
> EEG2 = clean_artifacts(EEG, 'FlatlineCriterion','off','ChannelCriterion','off','LineNoiseCriterion','off','Highpass','off','BurstCriterion',20,'WindowCriterion','off','BurstRejection','on','Distance','Euclidian');
> Tmp = rand(10000,10000); % reserve 80Mb of memory
> EEG3 = clean_artifacts(EEG, 'FlatlineCriterion','off','ChannelCriterion','off','LineNoiseCriterion','off','Highpass','off','BurstCriterion',20,'WindowCriterion','off','BurstRejection','on','Distance','Euclidian');
> isequal(EEG2, EEG3)
> 
> 1
> 
> Best wishes,
> 
> Arno
> 
> > On Apr 6, 2020, at 2:28 PM, John Johnson <john.johnson at gatech.edu> wrote:
> > 
> > Hello Yarden,
> > 
> > ASR's processing depends on the amount of available memory on the computer it is running on.
> > To obtain more consistent results, you can specify the amount of memory it should use.
> > More here:
> > https://sccn.ucsd.edu/wiki/Artifact_Subspace_Reconstruction_(ASR)#The_option_.27availableRAM_GB.27_is_available_to_fix_the_length_of_final_output.
> > 
> > Regards,
> > John
> > 
> > 
> > On 6 Apr 2020, at 7:37, Yarden Ben Horin wrote:
> > 
> >> Hi all,
> >> 
> >> My colleagues and I ran into a very strange problem while using eeglab
> >> plugin clean_rawData.
> >> We tried to use the clean_artifacts function to clean our data, but we got
> >> inconsistent result at each run. By inconsistent, the meaning is that
> >> different numbers of channels were removed from the data.
> >> 
> >> The code:
> >> EEG_clean = clean_artifacts(EEG,
> >> 'FlatlineCriterion',5,'ChannelCriterion',0.8,'LineNoiseCriterion',4,'Highpass','off','BurstCriterion',20,'WindowCriterion','off','BurstRejection','off','Distance','Euclidian');
> >> 
> >> We merely used EEG = pop_eegfiltnew(EEG, 'locutoff',4,'plotfreqz',0);
> >> before running clean_artifacts. We ran the code on several computers (all
> >> with the latest versions  of eeglab and clean_rawData), and each run on the
> >> same dataset produced different result (even on the same computer.)
> >> 
> >> Does clean_artifacts, or one of its sub functions, not
> >> deterministic function?
> >> 
> >> Hopefully you could help us with this frustrating situation.
> >> Many thanks,
> >> Yarden Ben Horin.
> >> 
> >> 
> >> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
> >> בלי
> >> וירוסים. www.avast.com
> >> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
> >> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> >> _______________________________________________
> >> 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
> 
> _______________________________________________
> 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
> 
> 	בלי וירוסים. www.avast.com



More information about the eeglablist mailing list