API#

This is the application programming interface (API) reference for classes (CamelCase names) and functions (underscore_case names) of MNE-ICALabel.

Most-used functions#

label_components(inst, ica, method)

Automatically label the ICA components with the selected method.

ICLabel#

This is the model originally available for EEGLab. The model was ported from matconvnet using pytorch or Microsoft onnxruntime.

ICLabel is designed to classify ICs fitted with an extended infomax ICA decomposition algorithm on EEG datasets referenced to a common average and filtered between [1., 100.] Hz. It is possible to run ICLabel on datasets that do not meet those specification, but the classification performance might be negatively impacted. Moreover, the ICLabel paper did not study the effects of these preprocessing steps.

Architecture:

ICLabel Neural Network Architecture

The model has three inputs: image (topomap), psd, and autocorrelation features. To encourage generalization, the image feature is rotated and negated, thus quadrupling the feature. After 3 convolutional layer with a ReLu activation, the 3 features are concatenated for the final layer.

iclabel_label_components(inst, ica[, ...])

Label the provided ICA components with the ICLabel neural network.

get_iclabel_features(inst, ica)

Generate the features for ICLabel neural network.

run_iclabel(images, psds, autocorr[, backend])

Run the ICLabel network on the provided set of features.

Features#

Contains functions to extract features from ICA instance and Raw or Epochs instances using MNE-Python.

get_topomaps(ica[, picks, res, ...])

Generate an array of scalp topographies for the picked components.

Annotating Components#

To facilitate annotation of the ICA components, we provide an API that conforms to the derivative standard of BIDS for EEG data.

mark_component(component, fname, method, ...)

Mark a component with a label.

write_components_tsv(ica, fname)

Write channels tsv file for ICA components.

In addition, as of v0.3, we have introduced a beta-version of a GUI that assists in annotated ICA components. This was heavily inspired by the annotation process in ICLabel. If you use this feature, please note that there may be significant bugs still. Please report these in the GH issues tab.

gui.label_ica_components(inst, ica[, show, ...])

Launch the IC labelling GUI.