NeuroTechX / moabb

Mother of All BCI Benchmarks
https://neurotechx.github.io/moabb/
BSD 3-Clause "New" or "Revised" License
654 stars 172 forks source link

Sleep stages classification #428

Open eegdude opened 1 year ago

eegdude commented 1 year ago

Currently, there is no support for sleep stages classification, however, there is a wrapper around sleep-edfx dataset in MNE (https://github.com/mne-tools/mne-python/tree/main/mne/datasets/sleep_physionet). Is it reasonable to add this paradigm (there are several reasonably-looking open PSG datasets), and if it is - is it better to rewrite the MNE version for sleep-edfx or add it as a dependency?

bruAristimunha commented 12 months ago

Hello @eegdude!

Good question 🤔 ! It might be reasonable to add Sleep Stage, but it would be a lot of work, and I'm not sure we have enough people for that task right now. But we can support it for you if you are interested. The main point is that it would involve two significant points:

1) About evaluation in moabb.

From the moabb evaluations, I think that only the cross-subject makes sense for the sleep stage, and even then, it is not the pattern followed in the literature. It is usually a cross-subject with a k-folder and not leave-one-out. It would be necessary to define some other evaluation or redefine the evaluation of methods. It's not a complicated thing since leave-out-out is a special case of k-folder, when k equals the number of instances.

2) Another point that can potentially get in the way is that the most interesting datasets are mostly not public, or it depends on the access request, such as MASS, SHHS, or any dataset from sleep data. In moabb, we integrate what is open by default. But if you have a list of interesting open datasets, we can merge a set and merge somewhere else that is not open (braindecode, for example).

Besides these points, we can integrate the sleep stage datasets without problems.

As for what would be easier, I feel that for the case of SleepEDFx, the dataset with mne structure, it is not that complicated to adapt the moabb structure. It might even be compatible already, given that we work with the mne structure on moabb.

Would you be interested in doing any of the paths? My team and I can support you with code review and integration.

eegdude commented 11 months ago

I have already made parts of the wrapper and downloader for sleep-edfx dataset - I can finish with the data loader and create a paradigm for sleep (probably, with LOSO cross-validation). There are some more promising datasets, namely this one - https://physionet.org/content/challenge-2018/1.0.0/ (too huge though, I doubt that anyone would download it through moabb)