Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    ValueError
Message:      Dataset 'ch_names' has length 4 but expected 15523
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 147, in get_rows_or_raise
                  return get_rows(
                      dataset=dataset,
                  ...<4 lines>...
                      column_names=column_names,
                  )
                File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
                  return func(*args, **kwargs)
                File "/src/services/worker/src/worker/utils.py", line 127, in get_rows
                  rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
                File "/src/services/worker/src/worker/utils.py", line 483, in safe_iter
                  yield from ds.decode(False) if ds.features else ds
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2840, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2373, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2398, in _iter_arrow
                  for key, pa_table in self.ex_iterable._iter_arrow():
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
                  for key, pa_table in iterator:
                                       ^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 419, in _iter_arrow
                  for key, pa_table in self.generate_tables_fn(**gen_kwags):
                                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/hdf5/hdf5.py", line 76, in _generate_tables
                  num_rows = _check_dataset_lengths(h5, self.info.features)
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/hdf5/hdf5.py", line 355, in _check_dataset_lengths
                  raise ValueError(f"Dataset '{path}' has length {dset.shape[0]} but expected {num_rows}")
              ValueError: Dataset 'ch_names' has length 4 but expected 15523

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

EESM23-Processed

Processed HDF5 export of the EESM23 OpenNeuro dataset. It contains paired in-ear EEG and scalp EEG sleep-staging samples from the scored ses-001 and ses-002 recordings of 10 subjects.

Update: this export now stores one 30-second epoch per sample (previously seven 4-second windows). This matches EESM19-Processed and the canonical sleep-staging unit. See "Preprocessing" below.

Preprocessing

Generated with Ear-EEG-FM-Benchmark/dataset/preprocess_eesm23.py using schema/eegfm version 0.5.0:

  • 0.1–100 Hz band-pass and 50 Hz notch filtering on each continuous recording
  • no re-referencing, resampling, or channel renaming
  • each labeled 30-second AASM scoring event is stored as one 30-second window (one sample = one epoch = one label = one prediction — the canonical sleep-staging unit)
  • classes: Wake, N1, N2, N3, REM; Artefact events are dropped
  • real sensor/data-loss NaN/Inf samples are preserved and recorded in overall and per-channel quality fields
  • the ear-EEG and scalp outputs are strictly row-aligned; a session is excluded from both when either modality is missing/unreadable, and a sample is retained only when it exists in both modalities
  • recording bounds are checked per 30-second window (the full epoch must lie inside the recording)
  • all signal values are stored as float32 microvolts at 250 Hz (7,500 samples per window)

Brief device data-loss gaps are interpolated before filtering to prevent FIR-kernel contamination, after which the original NaN positions are restored before window selection.

Why 30-second windows (and how to get 4-second windows)

The 30-second epoch is the unit at which sleep is scored (AASM) and evaluated. Every reference EEG foundation model that does sleep (BENDR, EEGPT, CBraMod, REVE, and the EEGPT comparison implementations of LaBraM/BIOT) ingests the full 30-second epoch downstream and emits one stage prediction per epoch, rather than splitting one label into independently-scored short windows. Storing 30 s is also a strict superset: the benchmark loader (dataset/loader.py) accepts an epoch_sec argument and crops a shorter window from each stored sample at load time, so a 4-second (or any ≤30 s) view is available without re-exporting; the reverse is not possible.

Files

File Channels Shape (N, C, T) Size
eesm23-in-ear-eeg.h5 RB, RT, LB, LT (15,523, 4, 7500) 1.74 GiB
eesm23-scalp-eeg.h5 M1, F3, C3, O1, M2, F4, C4, O2 (15,523, 8, 7500) 3.48 GiB

T = 7500 is one 30-second epoch at 250 Hz. N is the number of scored epochs, one sample per 30-second AASM epoch.

Label distribution (identical for both modalities — the samples are row-aligned):

Wake N1 N2 N3 REM
1,375 1,292 7,328 2,494 3,034

Retained and discarded epochs

The source scoring files label 17,074 30-second epochs across the 20 sessions (10 subjects × ses-001/ses-002): 16,558 carry one of the five retained sleep-stage labels and 516 are labeled Artefact. Each retained epoch becomes one 30-second sample, so the final files contain 15,523 strictly paired samples per modality. The exclusions from the 16,558 five-class candidates are:

Reason Epochs
Entire sub-006/ses-002 pair: truncated/unreadable PSG 1,031
30-second epoch out of bounds or with no cross-modality partner 4
Total excluded 1,035

(The 516 Artefact epochs are outside the five-class task and are never candidates.)

sub-006/ses-002 is dropped because its scalp PSG file is truncated/unreadable (OSError: could not read bytes). No sample is excluded because it contains NaN/Inf: the files retain 2,230 in-ear and 1,913 scalp samples with at least one non-finite value; their indices remain paired even when quality differs between modalities.

HDF5 schema (v0.5)

/data                 (N, C, 7500) float32
/durations            (N,)         int64
/nan_fraction         (N,)         float32
/channel_nan_fraction (N, C)       float32
/labels               (N,)         int64
/sample_id            (N,)         int64
/subject              (N,)         string
/session              (N,)         string
/task                 (N,)         string
/acquisition          (N,)         string
/run                   (N,)         string
/recording_id          (N,)         string
/trial_id              (N,)         int64
/event_id              (N,)         int64
/split_group_id        (N,)         int64
/window_start_sample   (N,)         int64
/window_stop_sample    (N,)         int64
/ch_names              (C,)         string

event_id and split_group_id both identify the source 30-second scoring row; here each sample is one epoch, so there is one sample per split group. For sequence-model sleep staging that needs adjacent-epoch context, group by subject+session and order by window_start_sample.

Important attributes include sfreq, class_names, unit, eegfm_version, preprocess_config_json, split_group_kind, and window_reference.

Downloads last month
80