Dataset Viewer
Auto-converted to Parquet Duplicate
recording
stringclasses
24 values
epoch
int32
0
1.14k
onset_s
int32
0
34.2k
n_samples
int32
256
7.68k
stage
stringclasses
5 values
annotation
stringclasses
5 values
within_lights_period
bool
2 classes
channels
listlengths
8
8
units
listlengths
8
8
phys_min
listlengths
8
8
phys_max
listlengths
8
8
dig_min
listlengths
8
8
dig_max
listlengths
8
8
prefilter
listlengths
8
8
signal
listlengths
8
8
SN001
0
0
7,680
W
Sleep stage W
false
[ "EEG F4-M1", "EEG C4-M1", "EEG O2-M1", "EEG C3-M2", "EMG chin", "EOG E1-M2", "EOG E2-M2", "ECG" ]
[ "uV", "uV", "uV", "uV", "uV", "uV", "uV", "uV" ]
[ -800, -800, -800, -800, -800, -800, -800, -2400 ]
[ 800, 800, 800, 800, 800, 800, 800, 2400 ]
[ -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768 ]
[ 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767 ]
["HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:1.0Hz LP:15(...TRUNCATED)
[[701,746,720,448,238,136,-110,-156,-146,-13,292,464,525,488,404,465,405,311,95,84,342,607,539,264,2(...TRUNCATED)
SN001
1
30
7,680
W
Sleep stage W
false
[ "EEG F4-M1", "EEG C4-M1", "EEG O2-M1", "EEG C3-M2", "EMG chin", "EOG E1-M2", "EOG E2-M2", "ECG" ]
[ "uV", "uV", "uV", "uV", "uV", "uV", "uV", "uV" ]
[ -800, -800, -800, -800, -800, -800, -800, -2400 ]
[ 800, 800, 800, 800, 800, 800, 800, 2400 ]
[ -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768 ]
[ 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767 ]
["HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:1.0Hz LP:15(...TRUNCATED)
[[1208,893,554,589,609,578,559,672,498,351,253,307,99,-365,-261,-184,-145,-176,-188,-74,1,9,-69,-352(...TRUNCATED)
SN001
2
60
7,680
W
Sleep stage W
true
[ "EEG F4-M1", "EEG C4-M1", "EEG O2-M1", "EEG C3-M2", "EMG chin", "EOG E1-M2", "EOG E2-M2", "ECG" ]
[ "uV", "uV", "uV", "uV", "uV", "uV", "uV", "uV" ]
[ -800, -800, -800, -800, -800, -800, -800, -2400 ]
[ 800, 800, 800, 800, 800, 800, 800, 2400 ]
[ -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768 ]
[ 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767 ]
["HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:1.0Hz LP:15(...TRUNCATED)
[[249,309,241,84,-131,-93,96,-8,-263,-371,-287,-64,-74,-97,-75,76,171,136,154,207,220,359,444,293,26(...TRUNCATED)
SN001
3
90
7,680
W
Sleep stage W
true
[ "EEG F4-M1", "EEG C4-M1", "EEG O2-M1", "EEG C3-M2", "EMG chin", "EOG E1-M2", "EOG E2-M2", "ECG" ]
[ "uV", "uV", "uV", "uV", "uV", "uV", "uV", "uV" ]
[ -800, -800, -800, -800, -800, -800, -800, -2400 ]
[ 800, 800, 800, 800, 800, 800, 800, 2400 ]
[ -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768 ]
[ 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767 ]
["HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:1.0Hz LP:15(...TRUNCATED)
[[34,169,222,414,549,858,1127,1213,1029,874,673,494,311,41,-172,-277,-254,-28,20,-60,11,77,59,39,10,(...TRUNCATED)
SN001
4
120
7,680
W
Sleep stage W
true
[ "EEG F4-M1", "EEG C4-M1", "EEG O2-M1", "EEG C3-M2", "EMG chin", "EOG E1-M2", "EOG E2-M2", "ECG" ]
[ "uV", "uV", "uV", "uV", "uV", "uV", "uV", "uV" ]
[ -800, -800, -800, -800, -800, -800, -800, -2400 ]
[ 800, 800, 800, 800, 800, 800, 800, 2400 ]
[ -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768 ]
[ 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767 ]
["HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:1.0Hz LP:15(...TRUNCATED)
[[421,492,654,860,798,619,470,256,-142,-480,-671,-753,-619,-593,-515,-371,-157,161,225,77,-44,83,495(...TRUNCATED)
SN001
5
150
7,680
W
Sleep stage W
true
[ "EEG F4-M1", "EEG C4-M1", "EEG O2-M1", "EEG C3-M2", "EMG chin", "EOG E1-M2", "EOG E2-M2", "ECG" ]
[ "uV", "uV", "uV", "uV", "uV", "uV", "uV", "uV" ]
[ -800, -800, -800, -800, -800, -800, -800, -2400 ]
[ 800, 800, 800, 800, 800, 800, 800, 2400 ]
[ -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768 ]
[ 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767 ]
["HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:1.0Hz LP:15(...TRUNCATED)
[[-226,-225,0,302,360,124,-162,-179,-11,110,-58,-101,-197,-226,-190,-322,-476,-567,-423,-270,-396,-3(...TRUNCATED)
SN001
6
180
7,680
W
Sleep stage W
true
[ "EEG F4-M1", "EEG C4-M1", "EEG O2-M1", "EEG C3-M2", "EMG chin", "EOG E1-M2", "EOG E2-M2", "ECG" ]
[ "uV", "uV", "uV", "uV", "uV", "uV", "uV", "uV" ]
[ -800, -800, -800, -800, -800, -800, -800, -2400 ]
[ 800, 800, 800, 800, 800, 800, 800, 2400 ]
[ -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768 ]
[ 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767 ]
["HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:1.0Hz LP:15(...TRUNCATED)
[[-118,-200,-252,-451,-652,-630,-395,-229,-182,-107,-4,180,462,580,624,620,604,637,547,254,-83,-219,(...TRUNCATED)
SN001
7
210
7,680
W
Sleep stage W
true
[ "EEG F4-M1", "EEG C4-M1", "EEG O2-M1", "EEG C3-M2", "EMG chin", "EOG E1-M2", "EOG E2-M2", "ECG" ]
[ "uV", "uV", "uV", "uV", "uV", "uV", "uV", "uV" ]
[ -800, -800, -800, -800, -800, -800, -800, -2400 ]
[ 800, 800, 800, 800, 800, 800, 800, 2400 ]
[ -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768 ]
[ 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767 ]
["HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:1.0Hz LP:15(...TRUNCATED)
[[48,167,185,154,237,211,-40,-332,-496,-464,-361,-164,-96,0,-27,59,87,96,42,-37,-118,-449,-561,-573,(...TRUNCATED)
SN001
8
240
7,680
N1
Sleep stage N1
true
[ "EEG F4-M1", "EEG C4-M1", "EEG O2-M1", "EEG C3-M2", "EMG chin", "EOG E1-M2", "EOG E2-M2", "ECG" ]
[ "uV", "uV", "uV", "uV", "uV", "uV", "uV", "uV" ]
[ -800, -800, -800, -800, -800, -800, -800, -2400 ]
[ 800, 800, 800, 800, 800, 800, 800, 2400 ]
[ -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768 ]
[ 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767 ]
["HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:1.0Hz LP:15(...TRUNCATED)
[[-202,-327,-354,-365,-371,-438,-449,-281,-200,-151,-234,-334,-326,-209,-263,-403,-508,-395,-226,-15(...TRUNCATED)
SN001
9
270
7,680
N1
Sleep stage N1
true
[ "EEG F4-M1", "EEG C4-M1", "EEG O2-M1", "EEG C3-M2", "EMG chin", "EOG E1-M2", "EOG E2-M2", "ECG" ]
[ "uV", "uV", "uV", "uV", "uV", "uV", "uV", "uV" ]
[ -800, -800, -800, -800, -800, -800, -800, -2400 ]
[ 800, 800, 800, 800, 800, 800, 800, 2400 ]
[ -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768 ]
[ 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767 ]
["HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:0.2Hz LP:35.0Hz","HP:1.0Hz LP:15(...TRUNCATED)
[[402,348,288,265,399,614,681,631,691,728,774,777,704,722,832,929,891,772,737,734,779,731,720,747,75(...TRUNCATED)
End of preview. Expand in Data Studio

HMC Sleep Staging: 151 Whole-Night Polysomnographies

Task Dataset Format Recordings Epochs Rate License

Unofficial mirror of the Haaglanden Medisch Centrum sleep staging database: 151 clinical whole-night PSGs with 137,243 scored 30-second epochs, one row per epoch with exact signal values.

Disclaimer

This repository is not an official release of the HMC sleep staging database.

The database was published on PhysioNet by Diego Alvarez-Estevez and Roselyne Rijsman, from recordings made at the Haaglanden Medisch Centrum sleep center (The Hague, The Netherlands). This repository does not claim ownership of the data. If you are an author or rights holder and want this repository changed or removed, please open a discussion and it will be addressed promptly.

These are recordings from real patients. Do not attempt to identify anyone in them. This dataset is for research and is not a medical device or a basis for clinical decisions.

Source and verification: built from PhysioNet version 1.1. Every file was checked against the official SHA256SUMS.txt, and each EDF's size against its header. A second EDF reader (pyedflib) returned the same samples. The text and EDF+ scoring files agree event by event. Every recording, rebuilt by joining its Parquet rows in order, is identical to the EDF.


Dataset Overview

The recordings come from 151 patients (85 male, 66 female, mean age 53.9) referred for polysomnography in 2018 for a range of sleep disorders, both in hospital and ambulatory. Each recording has four EEG derivations (F4-M1, C4-M1, O2-M1, C3-M2), two EOG (E1-M2, E2-M2), chin EMG and one ECG lead, all at 256 Hz. Sleep technicians scored every 30-second epoch as W, N1, N2, N3 or R under the AASM guidelines.

Stage Epochs Share
W 23,686 17.3%
N1 15,548 11.3%
N2 50,083 36.5%
N3 26,671 19.4%
R 21,255 15.5%

In total there are 1,144 hours of signal.


Changes from the Official Release

  • Cut each recording into its 30-second scoring epochs, one Parquet row each, with exact int16 samples and the stage.
  • Kept the unscored stretch after the last epoch of each recording as one final row with stage null. It is under 30 s, except in SN001, SN012, SN047, SN056 and SN121, where it is exactly 30 s.
  • Added within_lights_period and a recordings table with lights-off and lights-on times, stage counts and filter settings.
  • Added a samples config of 60 epochs (12 per stage) with a rendered preview.
  • Included the official RECORDS, SHA256SUMS.txt, LICENSE.txt, Subjects_info_aggregated.txt and Polyman template in original/. The EDF files are not duplicated here and remain on PhysioNet.
  • No signal values or labels were changed.

Dataset Structure

default: one row per 30-second epoch

Column Content
recording recording id, SN001 to SN154
epoch, onset_s, n_samples epoch number, start in seconds from the recording start, samples per channel (7,680 except the final unscored row)
stage W, N1, N2, N3 or R, null for the unscored tail
annotation the original EDF+ text, such as Sleep stage N2
within_lights_period true if the epoch lies fully between lights off and lights on
channels EEG F4-M1, EEG C4-M1, EEG O2-M1, EEG C3-M2, EMG chin, EOG E1-M2, EOG E2-M2, ECG
signal raw int16 EDF values, shape (8, n_samples)
units, phys_min, phys_max, dig_min, dig_max, prefilter per-channel EDF scaling and filter description

Rows are ordered by recording and epoch, eight recordings per Parquet file. There is one train split, because the authors define none.

Read before using the data

  • Recordings SN014, SN064 and SN135 do not exist. The authors removed them in version 1.1 because of unfixable signal errors.
  • Recordings use two filter settings. 83 recordings were low-passed at 35 Hz (EMG and ECG 1 to 150 Hz), and 68 at 128 Hz (EMG and ECG up to 1,000 Hz). See prefilter before comparing high-frequency content.
  • Recordings start at lights off, roughly. The files were clipped to the scored period, so scoring starts at 0 s. Lights off comes within the first 61 s, and lights on within 32 s of the end.
  • Split by recording. Each recording is a different patient, and epochs within a night are strongly correlated.
  • No per-patient demographics are published, only the aggregated figures in original/Subjects_info_aggregated.txt.
  • Convert to microvolts yourself: (signal - dig_min) * (phys_max - phys_min) / (dig_max - dig_min) + phys_min, per channel.

Usage

# pip install datasets pillow numpy
import numpy as np
from datasets import load_dataset

ds = load_dataset("dronefreak/HMC-Sleep-Staging", split="train", streaming=True)
row = next(r for r in ds if r["stage"] == "N3")

raw = np.asarray(row["signal"], dtype=np.int16)            # (8, 7680)
lo, hi = np.array(row["dig_min"])[:, None], np.array(row["dig_max"])[:, None]
pl, ph = np.array(row["phys_min"])[:, None], np.array(row["phys_max"])[:, None]
uv = (raw - lo) * (ph - pl) / (hi - lo) + pl
print(row["recording"], row["epoch"], row["channels"][0], uv.shape)

recordings = load_dataset("dronefreak/HMC-Sleep-Staging", "recordings", split="train")

Dataset Sources

Citation

Please cite the dataset, the original publication and PhysioNet:

@article{PhysioNet-hmc-sleep-staging-1.1,
  author  = {Alvarez-Estevez, Diego and Rijsman, Roselyne},
  title   = {{Haaglanden Medisch Centrum sleep staging database}},
  journal = {{PhysioNet}},
  year    = {2022},
  note    = {Version 1.1},
  doi     = {10.13026/t79q-fr32}
}

Alvarez-Estevez D, Rijsman RM (2021) Inter-database validation of a deep learning approach for automatic sleep scoring. PLoS ONE 16(8): e0256111. doi: 10.1371/journal.pone.0256111

Pollard T, Moody BE, Lehman L, Gow B, Fernandes C, Xie C, Johnson A, Mark RG, Heldt T. PhysioNet as a global platform for biomedical research. Nature Health, 2026. doi: 10.1038/s44360-026-00096-z


License

The HMC sleep staging database is released under Creative Commons Attribution 4.0 International (CC BY 4.0), and the official license text is in original/LICENSE.txt. This mirror reformats the data as described above. Please credit the authors and cite the papers.

Downloads last month
146