Skip to main content

mne-icalabel

Ruff Code style: black Imports: isort Codecov tests doc PyPI version PyPI Download count Conda Version Conda Downloads Conda Platforms JOSS

This repository is a conversion of the popular Matlab-based ICLabel classifier for Python. In addition, mne-icalabel provides extensions and improvements in the form of other models.

Why?

EEG and MEG recordings include artifacts, such as heartbeat, eyeblink, muscle, and movement activity. Independent component analysis (ICA) is a common method to remove artifacts, but typically relies on manual annotations labelling which independent components (IC) reflect noise and which reflect brain activity.

This package aims at automating this process, using the popular MNE-Python API for EEG, MEG and iEEG data.

Basic Usage

MNE-ICALabel estimates the labels of ICA components given a MNE-Python Raw or Epochs object and an ICA instance using the ICA decomposition available in MNE-Python.

from mne_icalabel import label_components

# assuming you have a Raw and ICA instance previously fitted
label_components(raw, ica, method='iclabel')

The only current available method is 'iclabel'.

Documentation

Stable version documentation. Dev version documentation.

Installation

The current stable release of mne-icalabel can be installed with pip, for example, by running:

pip install mne-icalabel

For further details about installation, see the install page.

To get the latest (development) version, using git, open a terminal and type:

git clone git://github.com/mne-tools/mne-icalabel.git
cd mne-icalabel
pip install -e .

The development version can also be installed directly using pip:

pip install https://api.github.com/repos/mne-tools/mne-icalabel/zipball/main

Alternatively, you can also download a zip file of the latest development version.

Contributing

If you are interested in contributing, please read the contributing guidelines.

Getting Help

MNE Forum

For any usage questions, please post to the MNE Forum. Be sure to add the mne-icalabel tag to your question.

Citing

If you use the mne-icalabel, please consider citing our paper:

@article{Li2022,
  title = {MNE-ICALabel: Automatically annotating ICA components with ICLabel in Python},
  volume = {7},
  ISSN = {2475-9066},
  url = {http://dx.doi.org/10.21105/joss.04484},
  DOI = {10.21105/joss.04484},
  number = {76},
  journal = {Journal of Open Source Software},
  publisher = {The Open Journal},
  author = {Li,  Adam and Feitelberg,  Jacob and Saini,  Anand Prakash and H\"{o}chenberger, Richard and Scheltienne,  Mathieu},
  year = {2022},
  month = aug,
  pages = {4484}
}

And the paper associated to the model used:

  • ICLabel
@article{PionTonachini2019,
  title = {ICLabel: An automated electroencephalographic independent component classifier,  dataset,  and website},
  volume = {198},
  ISSN = {1053-8119},
  url = {http://dx.doi.org/10.1016/j.neuroimage.2019.05.026},
  DOI = {10.1016/j.neuroimage.2019.05.026},
  journal = {NeuroImage},
  publisher = {Elsevier BV},
  author = {Pion-Tonachini,  Luca and Kreutz-Delgado,  Ken and Makeig,  Scott},
  year = {2019},
  month = sep,
  pages = {181–197}
}

Future versions of the software are aimed at improved models and may have different papers associated with it.

Release files for mne-icalabel 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mne-icalabel 0.9.0
File Size Uploaded
mne_icalabel-0.9.0.tar.gz 48.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for mne-icalabel 0.9.0
File Interpreter ABI Platform
mne_icalabel-0.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 97.6 MB

Release files / mne_icalabel-0.9.0.tar.gz

Download URL mne_icalabel-0.9.0.tar.gz
Size 48.8 MB
Tags Source
SHA-256 checksum
How to use checksums
85c674ef96f39fa6e9bfd8d359fc7e84f05d5fa43e3ade332ef95a7209386614
BLAKE2b-256 checksum
How to use checksums
696dce0746fb6cac72e54f2c700a34ecd124e377c1478f9f06c1a6417bd9a763
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release files / mne_icalabel-0.9.0-py3-none-any.whl

Download URL mne_icalabel-0.9.0-py3-none-any.whl
Size 48.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
6abb5faa95ad7a5f6e9f9fa80ab7c27eb92101e8bb25f2bd703712aaf7cba689
BLAKE2b-256 checksum
How to use checksums
47a571a3ec88d87da7ec40c48ed8c85677b9f07f2cef4076e479cc024d954339
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4

2 release files

0.3.1

2 release files

0.3

2 release files

0.2

1 release file

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page