Giter Site home page Giter Site logo

c-torre / autoreject Goto Github PK

View Code? Open in Web Editor NEW

This project forked from autoreject/autoreject

0.0 1.0 0.0 695 KB

Automated rejection and repair of bad trials/sensors in M/EEG

Home Page: http://autoreject.github.io/

License: BSD 3-Clause "New" or "Revised" License

Python 99.22% Makefile 0.78%

autoreject's Introduction

autoreject

CircleCI GitHub Actions Codecov PyPI Conda-Forge

This is a library to automatically reject bad trials and repair bad sensors in magneto-/electroencephalography (M/EEG) data.

http://autoreject.github.io/_images/sphx_glr_plot_visualize_bad_epochs_002.png

The documentation can be found under the following links:

Installation

We recommend the Anaconda Python distribution and a Python version >= 3.7. To obtain the stable release of autoreject, you can use pip:

pip install -U autoreject

Or conda:

conda install -c conda-forge autoreject

If you want the latest (development) version of autoreject, use:

pip install https://api.github.com/repos/autoreject/autoreject/zipball/master

If you do not have admin privileges on the computer, use the --user flag with pip.

To check if everything worked fine, you can do:

python -c 'import autoreject'

and it should not give any error messages.

Below, we list the dependencies for autoreject. All required dependencies are installed automatically when you install autoreject.

  • mne (>=0.14)
  • numpy (>=1.8)
  • scipy (>=0.16)
  • scikit-learn (>=0.18)
  • joblib
  • matplotlib (>=1.3)

Optional dependencies are:

  • tqdm (for nice progress-bars when setting verbose=True)
  • h5py (for writing autoreject objects using the HDF5 format)
  • openneuro-py (>= 2021.7, for fetching data from OpenNeuro.org)

Quickstart

The easiest way to get started is to copy the following three lines of code in your script:

>>> from autoreject import AutoReject
>>> ar = AutoReject()
>>> epochs_clean = ar.fit_transform(epochs)  # doctest: +SKIP

This will automatically clean an epochs object read in using MNE-Python. To get the rejection dictionary, simply do:

>>> from autoreject import get_rejection_threshold
>>> reject = get_rejection_threshold(epochs)  # doctest: +SKIP

We also implement RANSAC from the PREP pipeline. The API is the same:

>>> from autoreject import Ransac
>>> rsc = Ransac()
>>> epochs_clean = rsc.fit_transform(epochs)  # doctest: +SKIP

For more details check out the example to automatically detect and repair bad epochs.

Bug reports

Use the github issue tracker to report bugs.

Cite

[1] Mainak Jas, Denis Engemann, Federico Raimondo, Yousra Bekhti, and Alexandre Gramfort, "Automated rejection and repair of bad trials in MEG/EEG." In 6th International Workshop on Pattern Recognition in Neuroimaging (PRNI), 2016.

[2] Mainak Jas, Denis Engemann, Yousra Bekhti, Federico Raimondo, and Alexandre Gramfort. 2017. "Autoreject: Automated artifact rejection for MEG and EEG data". NeuroImage, 159, 417-429.

autoreject's People

Contributors

jasmainak avatar dengemann avatar sappelhoff avatar agramfort avatar mscheltienne avatar mkoculak avatar alexrockhill avatar pstetz avatar rob-luke avatar fraimondo avatar mattboggess avatar hoechenberger avatar adswa avatar c-torre avatar hubertjb avatar massich avatar systole-docs avatar raghavrv avatar callezenwaka avatar jona-sassenhagen avatar rugolotti avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.