Simply EEGLAB
ICLabel & removing components
Station 4 · Lesson 5 · EEGLAB 2026.1
In the GUI
- ToolsClassify components using ICLabelLabel components
- Select which icversion of ICLabel to use:Default (recommended)OK
- ToolsClassify components using ICLabelFlag components as artifacts
- Select range for flagging component for rejectionMinMaxMuscleEye
- OK
- ToolsRemove components from data
- Manual rej.YesYes
- List of component(s) to remove from dataOK
- Plot single trials
- Accept
- FileSave current dataset asOverwrite it in memory (set=yes; unset=create a new dataset)
D1 main cleanD1_main_clean.set
Script
EEG = pop_iclabel(EEG, 'default');
classes = EEG.etc.ic_classification.ICLabel.classes;
probs = EEG.etc.ic_classification.ICLabel.classifications;
disp(classes);
disp(round(probs(1:10, :) * 100));
thresh = [NaN NaN; 0.9 1; 0.9 1; NaN NaN; NaN NaN; NaN NaN; NaN NaN];
EEG = pop_icflag(EEG, thresh);
artifactComps = find(EEG.reject.gcompreject);
addpath(fullfile(fileparts(which('iclabel')), 'viewprops'));
if ~isempty(artifactComps)
pop_viewprops(EEG, 0, artifactComps);
end
if ~isempty(artifactComps)
EEG = pop_subcomp(EEG, artifactComps, 0);
end
EEG.setname = 'D1 main clean';
EEG = pop_saveset(EEG, 'filename', 'D1_main_clean.set', 'filepath', pwd);
EEG = pop_eegfiltnew(EEG, 'hicutoff', 30);
EEG.setname = 'D1 main clean lp30';
EEG = pop_saveset(EEG, 'filename', 'D1_main_clean_lp30.set', 'filepath', pwd);Which value should I choose?
| Setting | Value |
|---|---|
| Classifier version | Default |
| Flagging threshold | Eye and Muscle above 90% |
| Other classes (Heart, Line Noise, Channel Noise) | Not flagged automatically |
| ICLabel version | 1.6 or newer |
Check
- Compare the signal
- Count the components
- Open the component maps
For your Methods
Components were classified with ICLabel (version 1.7; Pion-Tonachini et al., 2019), and components with a probability above 0.9 for the Eye or Muscle class were reviewed visually and removed ([N] components). Data were then low-pass filtered (passband edge 30 Hz, cutoff frequency [33.64] Hz at −6 dB, filter length [59] points; pop_eegfiltnew, firfilt plugin 2.8).