braindecode.datasets.SleepPhysionet

class braindecode.datasets.SleepPhysionet(subject_ids=None, recording_ids=None, preload=False, load_eeg_only=True, crop_wake_mins=30, crop=None)

Sleep Physionet dataset.

Sleep dataset from https://physionet.org/content/sleep-edfx/1.0.0/. Contains overnight recordings from 78 healthy subjects.

See [MNE example](https://mne.tools/stable/auto_tutorials/sample-datasets/plot_sleep.html).

Parameters
subject_ids: list(int) | int | None

(list of) int of subject(s) to be loaded. If None, load all available subjects.

recording_ids: list(int) | None

Recordings to load per subject (each subject except 13 has two recordings). Can be [1], [2] or [1, 2] (same as None).

preload: bool

If True, preload the data of the Raw objects.

load_eeg_only: bool

If True, only load the EEG channels and discard the others (EOG, EMG, temperature, respiration) to avoid resampling the other signals.

crop_wake_mins: float

Number of minutes of wake time to keep before the first sleep event and after the last sleep event. Used to reduce the imbalance in this dataset. Default of 30 mins.

cropNone | tuple

If not None crop the raw files (e.g. to use only the first 3h). Example: crop=(0, 3600*3) to keep only the first 3h.

Examples using braindecode.datasets.SleepPhysionet