ica_processing.classify_ica_components#
- autoclean.functions.ica.ica_processing.classify_ica_components(raw, ica, method='iclabel', verbose=None)[source]#
Classify ICA components using automated algorithms.
This function uses automated classification methods to identify the likely source of each ICA component (brain, eye, muscle, heart, etc.). Supports both ICLabel and ICVision methods for component classification.
- Parameters:
- raw
mne.io.Raw
The raw EEG data used for ICA fitting.
- ica
mne.preprocessing.ICA
The fitted ICA object to classify.
- method
str
,default
“iclabel” Classification method to use. Options: “iclabel”, “icvision”.
- verbosebool or
None
,default
None
Control verbosity of output.
- raw
- Returns:
- component_labels
pd.DataFrame
DataFrame with columns: - “component”: Component index - “ic_type”: Predicted component type (brain, eye, muscle, etc.) - “confidence”: Confidence score (0-1) for the prediction - Additional columns with probabilities for each component type
- component_labels
See also
fit_ica
Fit ICA decomposition to EEG data
apply_ica_rejection
Apply ICA to remove artifact components
mne_icalabel.label_components
ICLabel implementation
Examples
>>> labels = classify_ica_components(raw, ica, method="iclabel") >>> labels = classify_ica_components(raw, ica, method="icvision") >>> artifacts = labels[(labels["ic_type"] == "eye") & (labels["confidence"] > 0.8)]