skjerns / AutoSleepScorer

An open-source sleep stage classification Python package
GNU Affero General Public License v3.0
103 stars 22 forks source link

How to run the model with only eeg data in edf file? #7

Open yiboliu94 opened 6 years ago

yiboliu94 commented 6 years ago

Hi,

It's really a good project(not flattering, it's really fantastic). In your thesis, you compared the accuracy of different input channel selection such as eeg, eeg+emg, eeg+eog, and all. But the coed itself requires all channels? I wonder how can I run the AutoSleepScorer with only eeg channel?

Sincerely Liu

PaulMuadDib commented 6 years ago

Hi Liu, Did you try like this ?

skjerns commented 5 years ago

Thanks!

The (preliminary) pre-trained weights that I supplied need all three channels to work correctly. For usage of only one channel (EEG), you would need to re-train a network. It is not possible to leave one channel empty, as the neural network expects all three channels being present. This decision was made as all channels turned out to give the highest accuracy.

@PaulMuadDib With the example you provided, it will try to infere the EMG/EOG channel automatically from the edfx file (if I remember correctly). A single-channel mode is not yet implemented (also as the weights provided require three input channels)

PaulMuadDib commented 5 years ago

@skjerns do you think that such a network could learn (valuable representations of the EEG signals) while training with different subsets of electrodes & injecting null (or a low variance white noise / null information) signals in the unused inputs ? Or we must fully rethink the network architecture / principles to enable it to train on different sleep databases with different electrode montages ?

skjerns commented 5 years ago

It is possible to just remove the channels not used. However, it is necessary to re-train the network. Although training one network to be able to use a variable subset of electrodes will be possible, I'd say it is easier to train separate networks for different channel combinations.