Skip to main content

MNE-ICALabel: Automatic labeling of ICA components from MEG, EEG and iEEG data with MNE.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mne_icalabel-0.8.1.tar.gz (48.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mne_icalabel-0.8.1-py3-none-any.whl (48.8 MB view details)

Uploaded Python 3

File details

Details for the file mne_icalabel-0.8.1.tar.gz.

File metadata

  • Download URL: mne_icalabel-0.8.1.tar.gz
  • Upload date:
  • Size: 48.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.8

File hashes

Hashes for mne_icalabel-0.8.1.tar.gz
Algorithm Hash digest
SHA256 ce41560ea184fc5e327c8a2ad7f3d4aa5f4a7d844e25148acfff6b9623907187
MD5 455c0c2283ba0256db065549842a32dd
BLAKE2b-256 b237d1b070de1134761810e245feb94e82e027dd8829d84c9f78f7e0e4110950

See more details on using hashes here.

File details

Details for the file mne_icalabel-0.8.1-py3-none-any.whl.

File metadata

  • Download URL: mne_icalabel-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 48.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.8

File hashes

Hashes for mne_icalabel-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7225d4b5af230e1a8561e4f0412f3a5dff810624432fc15bf304c94392930ec7
MD5 18e9402da6a233498b7ff78066f289ba
BLAKE2b-256 443638e856311011a1056526979a03343ccf517aba1123a5e61ba05813c51ad6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page