[Eeglablist] Script for artifact rejection by ICLabel

時本真吾 tokimoto at mejiro.ac.jp
Tue Mar 16 01:55:53 PDT 2021

Dear EEGLAB experts,

I usually reject artifacts by independent components with ICLabel. I reject an IC when its probability of the brain activity is lower than 70% and its residual variance is greater than 15% following Makoto's preprocessing pipeline. This criterion works very well, and I tried to apply the same criterion to multiple participants with the batch script below. However, the number of remaining ICs is much smaller than the number of ICs selected by the eye inspection with the same criterion.

% Perform IC rejection using ICLabel scores and r.v. from dipole fitting.
EEG       = IClabel(EEG, 'default');
brainIdx  = find(EEG.etc.ic_classification.ICLabel.classifications(:,1) >= 0.7);
rvList    = [EEG.dipfit.model.rv];
goodRvIdx = find(rvList < 0.15); 
goodIcIdx = intersect(brainIdx, goodRvIdx);
EEG = pop_subcomp(EEG, goodIcIdx, 0, 1);
EEG.etc.ic_classification.ICLabel.classifications = EEG.etc.ic_classification.ICLabel.classifications(goodIcIdx,:);

I would like to automate the artifact rejection by ICLabel to avoid human errors. Could anyone give me suggestions for the difference in the humber of remaining ICs? Thank you in advance.


Shingo Tokimoto, Ph.D.
in Linguistics and Psychology
Department of Foreign Languages
Mejiro University
4-31-1, Naka-Ochiai, Shinjuku, Tokyo,
161-8539, Japan
tokimoto at mejiro.ac.jp

More information about the eeglablist mailing list