[Eeglablist] Inconsistent results using clean_artifacts

Delorme, Arnaud adelorme at ucsd.edu
Mon Mar 14 18:32:36 PDT 2022


Dear Christina,

We have made some changes to the function. Would you mind to try again and let me know.
Pull the latest changes from clean_rawdata or change this function 

https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_sccn_clean-5Frawdata_blob_master_clean-5Fchannels.m&d=DwIGaQ&c=-35OiAkTchMrZOngvJPOeA&r=kB5f6DjXkuOQpM1bq5OFA9kKiQyNm1p6x6e36h3EglE&m=YQiXl2yNovGqdHvNPG8zQpYahSMFWZzKTTWYdDdt9xfmuVZr2nL-A62DICVG3k_x&s=m_lIazUVLiKmJGWS62y_Xfl-wM7nyXcFoD9vh_3yrW4&e= 

Best wishes,

Arno

> On Mar 14, 2022, at 8:55 AM, Gil Avila, Cristina <cristina.gil at tum.de> wrote:
> 
> Thank you all for your input.
> 
> First, I have noticed that the set of bad channels is only different every time I restart EEGLab (please see the code below, I run EEGLab command inside the loop over repetitions). Otherwise results are stable (@Arno Could this explain why it passed all the tests?).
> 
> Second, I would prefer not to discard the RANSAC method to detect bad channels if I find a stable solution. I believe that the RANSAC method is the core for detecting bad channels in the clean_rawdata function. The two other options (clean channels based on flat line and on the high frequency activity) seem to me more a preliminary step to the RANSAC. Therefore I have tested:
> 
>  1.  How the ‘ChannelCriterion’ parameter influences the selected bad channels. I have tried the values 0.7, 0.8 (default) and 0.9. The higher the value, the less reproducible is the result. This was not a surprise if I look at the definition of the ChannelCriterion parameter: ‘if a channel is correlated at less than this value to an estimate based on other channels it is considered abnormal in the given time window’. Still, even being lax with the correlation threshold (0.7) I don’t get reproducible results.
>  2.  How the high-pass bandwidth influences the selected bad channels. I have tried a highpass with bandwidth [1 1.5] instead of the default [0.25 0.75] with the ‘ChannelCriterion’ parameter fixed at 0.8. This does not seem to increase the reproducibility.
>  3.  How the ‘NumSamples’ RANSAC parameter of clean_artifacts() influences the selected bad channels. I have tried with 50 (default), 100, 500 and 1000 samples with ‘ChannelCriterion’ fixed at 0.8. Increasing this parameter to 1000 makes the output more reliable at the cost of more computation time (~1.5 min per recording).
> 
> Brief comment regarding my data: I am working with eyes-closed resting-state, 29 channels, recordings of 5 mins of duration sampled at 500 Hz (~150000 samples).
> For each case I have run 10 repetitions. You can also find along with the code figures of all test cases. Figures represent how often was each channel marked bad in each recording.
> 
> For reproducibility I attach my code and the small dataset I am using. I am using most recent versions of EEGLab and clean_rawdata from github.
> Code: https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_crisglav_replication-5Fclean-5Frawdata_&d=DwIGaQ&c=-35OiAkTchMrZOngvJPOeA&r=kB5f6DjXkuOQpM1bq5OFA9kKiQyNm1p6x6e36h3EglE&m=9kMD83-bMiRQ1H-eab9jWW8Eu5YH6Or42DmjKy0JnGa2zJW2viFL7SklrAPaI4QZ&s=ERFGKAjGe-JeFD5-QVSIribDtISlZigsK_HWmFyhhLE&e= 
> Dataset: https://urldefense.proofpoint.com/v2/url?u=https-3A__syncandshare.lrz.de_getlink_fiX7VwVdbGEsMTf46kqrcvx3_rawBIDS&d=DwIGaQ&c=-35OiAkTchMrZOngvJPOeA&r=kB5f6DjXkuOQpM1bq5OFA9kKiQyNm1p6x6e36h3EglE&m=9kMD83-bMiRQ1H-eab9jWW8Eu5YH6Or42DmjKy0JnGa2zJW2viFL7SklrAPaI4QZ&s=IE7I9gzhYZt8icPVf1n-jwkSFMzF6XB21wp71L-AqQ8&e= 
> Note: to test 3) I had to change clean_artifacts code and add in line 186
> {'num_samples','NumSamples'}, 50, ... % line 186
> And substitute line 232 by
> [EEG,removed_channels] = clean_channels(EEG,chancorr_crit,line_crit,[],channel_crit_maxbad_time,num_samples);
> 
> 
> 
> 
> 
> --
> Cristina Gil Ávila – PhD candidate
> Department of Neurology
> Technische Universität München
> Munich, Germany
> cristina.gil at tum.de<mailto:cristina.gil at tum.de>
> painlabmunich.de<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.painlabmunich.de_&d=DwIGaQ&c=-35OiAkTchMrZOngvJPOeA&r=kB5f6DjXkuOQpM1bq5OFA9kKiQyNm1p6x6e36h3EglE&m=9kMD83-bMiRQ1H-eab9jWW8Eu5YH6Or42DmjKy0JnGa2zJW2viFL7SklrAPaI4QZ&s=AFm5wVq6o16yTXrK4Ijh-UZyeNtfGIbE4eV-Pee1WVU&e= >
> 
> _______________________________________________
> 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