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:
rawmne.io.Raw

The raw EEG data used for ICA fitting.

icamne.preprocessing.ICA

The fitted ICA object to classify.

methodstr, default “iclabel”

Classification method to use. Options: “iclabel”, “icvision”.

verbosebool or None, default None

Control verbosity of output.

Returns:
component_labelspd.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

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)]