Skip to main content

Solves the M/EEG inverse problem using artificial neural networks with Python 3 and the MNE library.

Project description

esinet: Electric source imaging using artificial neural networks (ANNs)

esinet let's you solve the EEG inverse problem using ANNs. It currently supports two main architectures:

Model 1

A fully connected neural network which is trained on single time instances of M/EEG data. This model was described in our paper.

Model 2

A temporal long-short-term memory (LSTM) model which is trained on sequences of EEG data. A similar model only with different output specifications has been presented in a work bei Cui et al., 2019.


esinet

Neural network design was created here



Dependencies:


Installation from PyPi

Use pip to install esinet and all its dependencies from PyPi:

pip install esinet

Quick start

The following code demonstrates how to use this package:

from esinet import Simulation, Net

# Simulate M/EEG data
settings = dict(duration_of_trial=0.2)
sim = Simulation(fwd, info, settings=settings)
sim.simulate(n_samples=10000)

# Train neural network on the simulated data
net = Net(fwd)
ann.fit(sim)

# Perform predictions on your data
stc = ann.predict(epochs)

First steps

Check out one of the tutorials to learn how to use the package:

  • Tutorial 1: The fastest way to get started with Model 1. This tutorial can be used as an entry point. If you want to dig deeper you should have a look at the next tutorials, too!
  • Tutorial 2: Use esinet with low-level functions that allow for more control over your parameters with respect to simulations and training of the neural network.
  • Tutorial 3: A demonstration of simulation parameters and how they affect the model performance.
  • Tutorial 4: Learn to use the LSTM network (Model 2) to predict source time-series from EEG time-series.

Feedback

Please leave your feedback and bug reports at lukas_hecker@web.de.


Literature

Please cite us with this publication:

@ARTICLE{10.3389/fnins.2021.569918, AUTHOR={Hecker, Lukas and Rupprecht, Rebekka and Tebartz Van Elst, Ludger and Kornmeier, Jürgen},
TITLE={ConvDip: A Convolutional Neural Network for Better EEG Source Imaging},
JOURNAL={Frontiers in Neuroscience},
VOLUME={15},
PAGES={533},
YEAR={2021},
URL={https://www.frontiersin.org/article/10.3389/fnins.2021.569918},
DOI={10.3389/fnins.2021.569918},
ISSN={1662-453X} }

Troubleshooting

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

esinet-0.1.0.tar.gz (28.2 kB view hashes)

Uploaded Source

Built Distribution

esinet-0.1.0-py3-none-any.whl (29.4 kB view hashes)

Uploaded Python 3

Supported by

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