Giter VIP home page Giter VIP logo

pyeeglab's Introduction

Hi there ๐Ÿ‘‹

I'm Alessio Zanga, a PhD student at Roche in collaboration with University of Milan - Bicocca in a reasearch project titled "Structural Causal Models: Static and Dynamic Causal Networks for Health and Medicine".

Working on ๐Ÿ‘ท

I'm actively working on:

  • ๐ŸŒฒ Fast and safe implementation of graph theory with GRATHE,
  • ๐Ÿ”ฌ Causal inference using graphical models with CaMo.

Previously worked on:

  • ๐Ÿง  Neural networks applied to neuroscience with PyEEGLab,
  • ๐Ÿ”ฎ Bayesian networks for missing data with MADBayes,
  • ๐Ÿค– Reinforcement learning for general purpose with REILLY.

Speaking of ๐Ÿ’ฌ

I really like functional programming and scientific programming. I'm quite fluent in Python ๐Ÿ and C++ ๐Ÿ”ง, while currently learning Rust ๐Ÿฆ€. Even if those languages are like day ๐ŸŒž & night ๐ŸŒ›, I enjoy mixing them together for easy usage ๐Ÿ˜ธ and blazing performance โšก (with related headache ๐Ÿ˜ต).

I've also experimented with different tools, like:

  • :octocat: Git, GitHub and GitLab ('cause one will never be enough),
  • ๐Ÿš€ Travis and Jenkins for CI/CD development,
  • ๐Ÿ‹ Doker for lightweight container shipping,
  • ๐ŸŽฏ TensorFlow and Keras for research purposes.

Reading about ๐Ÿ“š

If you are interested in some readings:

Looking for ๐Ÿ“ˆ

Alessio's github stats

pyeeglab's People

Contributors

alessiozanga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pyeeglab's Issues

Can't process TUH Artifact Dataset

Hi,
I'm trying to create the TUH Artifact Dataset as follows:

dataset = TUHEEGArtifactDataset('~/Documents/eeg/tuh_artifact_eeg/edf')
dataset.set_cache_manager(PickleCache('~/Documents/eeg/export'))

preprocessing = Pipeline([
    CommonChannelSet(),
    LowestFrequency(),
    ToDataframe(),
    MinMaxCentralizedNormalization(),
    ToNumpy()
])
dataset = dataset.set_pipeline(preprocessing).load()
data, labels = dataset['data'], dataset['labels']

But it fails with the following message:
ValueError: tmin (600.9454) must be less than tmax (600.9)

I'm using the v2.0.0 of the dataset: https://www.isip.piconepress.com/projects/tuh_eeg/downloads/tuh_eeg_artifact/v2.0.0/edf/

First example in README.md is wrong

Hi,
Thanks for the nice library. Just a small comment, the first example in the README is:

from pyeeglab import *
dataset = TUHEEGAbnormalDataset()
pipeline = Pipeline([
    CommonChannelSet(),
    LowestFrequency(),
    ToDataframe(),
    MinMaxCentralizedNormalization(),
    DynamicWindow(8),
    ToNumpy()
])
dataset = dataset.set_pipeline(preprocessing).load()
data, labels = dataset['data'], dataset['labels']

but it should be:

from pyeeglab import *
dataset = TUHEEGAbnormalDataset()
preprocessing = Pipeline([
    CommonChannelSet(),
    LowestFrequency(),
    ToDataframe(),
    MinMaxCentralizedNormalization(),
    DynamicWindow(8),
    ToNumpy()
])
dataset = dataset.set_pipeline(preprocessing).load()
data, labels = dataset['data'], dataset['labels']

sched_getaffinity for mac

Hi! I'm trying to use your dataset on Mac OS X, and sched_getaffinity is not included there. Is there any hotfix for this? I'm considering using simple Pool(2) instead of len you provided, is that correct?

RuntimeError

I have error when try run example

`
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.

    This probably means that you are not using fork to start your
    child processes and you have forgotten to use the proper idiom
    in the main module:

        if __name__ == '__main__':
            freeze_support()
            ...

    The "freeze_support()" line can be omitted if the program
    is not going to be frozen to produce an executable.

Process finished with exit code -1
`

About data processing: Dumping cache file

Hi Alessio,

Thanks for open sourcing the library. I am trying to process it tuh_eeg_seizure dataset. But the process stuck at Dumping cache file . Any ideas what's causing this? if it is normal how long shall I wait for it to finish? Here's the code snippet I used:

path = "./tuh_eeg_seizure/v1.5.2/edf/train"
tuh_artifact_dataset = TUHEEGSeizureDataset(path)

preprocessing = Pipeline([
    CommonChannelSet(),
    LowestFrequency(),
    ToDataframe(),
    MinMaxCentralizedNormalization(),
    DynamicWindow(8),
    ToNumpy()
])

Problem with processing TUH EEG Seizure dataset

Hi Alessio,

I am trying processing TUH EEG Seizure dataset (v1.5.2) on a machine with 8 cpus and 64 GB of RAM but the process is taking really long (so far process is running for like 10 hours) and seems stuck at DEBUG: Environment variables:....... . Any idea how to resolve this and process it quickly!

Thanks in advance.

About train/dev split of tuh_eeg_seizure v1.5.2

Hi,

There are train and dev splits available for TUH EEG Seizure dataset but it is unclear how train and dev splits are pre-processed from the following:

def __init__(self, path: str = './data/tuh_eeg_seizure/v1.5.2/edf/') -> None:

Could you please explain? Does it mean that the current implementation of tuh_eeg_seizure_dataset.py jointly process train and dev sets?

I tried using the path ./data/tuh_eeg_seizure/v1.5.2/edf/train to process training set and ./data/tuh_eeg_seizure/v1.5.2/edf/dev for processing development set independently but there is channel mismatch error during processing of development set.

Traceback (most recent call last): File "/opt/conda/lib/python3.7/multiprocessing/pool.py", line 121, in worker result = (True, func(*args, **kwds)) File "/opt/conda/lib/python3.7/multiprocessing/pool.py", line 47, in starmapstar return list(itertools.starmap(args[0], args[1])) File "/opt/conda/lib/python3.7/site-packages/PyEEGLab-0.9.4-py3.7.egg/pyeeglab/pipeline/pipeline.py", line 39, in _trigger_pipeline data = preprocessor.run(data, **kwargs) File "/opt/conda/lib/python3.7/site-packages/PyEEGLab-0.9.4-py3.7.egg/pyeeglab/preprocess/signal/channel_selector.py", line 29, in run data.set_channels(channels) File "/opt/conda/lib/python3.7/site-packages/PyEEGLab-0.9.4-py3.7.egg/pyeeglab/io/raw.py", line 63, in set_channels self.reader = self.open().drop_channels(channels) File "/opt/conda/lib/python3.7/site-packages/mne/channels/channels.py", line 845, in drop_channels return self._pick_drop_channels(idx) File "/opt/conda/lib/python3.7/site-packages/mne/channels/channels.py", line 859, in _pick_drop_channels pick_info(self.info, idx, copy=False) File "<decorator-gen-8>", line 21, in pick_info File "/opt/conda/lib/python3.7/site-packages/mne/io/pick.py", line 475, in pick_info raise ValueError('No channels match the selection.') ValueError: No channels match the selection. """

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.