Datasets:
Dataset Viewer
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: CastError
Message: Couldn't cast
model_name: string
dataset_name: string
embedding_dim: int64
n_subjects: int64
per_fold: list<item: struct<fold: int64, accuracy: double, macro_f1: double, kappa: double, per_class_f1: stru (... 279 chars omitted)
child 0, item: struct<fold: int64, accuracy: double, macro_f1: double, kappa: double, per_class_f1: struct<W: doubl (... 267 chars omitted)
child 0, fold: int64
child 1, accuracy: double
child 2, macro_f1: double
child 3, kappa: double
child 4, per_class_f1: struct<W: double, N1: double, N2: double, N3: double, REM: double>
child 0, W: double
child 1, N1: double
child 2, N2: double
child 3, N3: double
child 4, REM: double
child 5, support: struct<W: int64, N1: int64, N2: int64, N3: int64, REM: int64>
child 0, W: int64
child 1, N1: int64
child 2, N2: int64
child 3, N3: int64
child 4, REM: int64
child 6, n_train_subjects: int64
child 7, n_test_subjects: int64
child 8, n_train_epochs: int64
child 9, n_test_epochs: int64
child 10, confusion_matrix: list<item: list<item: int64>>
child 0, item: list<item: int64>
child 0, item: int64
n_folds: int64
n_classes: int64
mean_std: struct<accuracy: struct<mean: double, std: double>, macro_f1: struct<mean: double, std: double>, kap (... 38 chars omitted)
child 0, accuracy: struct<mean: double, std: double>
child 0, mean: double
child 1, std: double
child 1, macro_f1: struct<mean: double, std: double>
child 0, mean: double
child 1, std: double
child 2, kappa: struct<mean: double, std: double>
child 0, mean: double
child 1, std: double
class_names: list<item: string>
child 0, item: string
pooled: struct<accuracy: double, macro_f1: double, kappa: double, per_class_f1: struct<W: double, N1: double (... 160 chars omitted)
child 0, accuracy: double
child 1, macro_f1: double
child 2, kappa: double
child 3, per_class_f1: struct<W: double, N1: double, N2: double, N3: double, REM: double>
child 0, W: double
child 1, N1: double
child 2, N2: double
child 3, N3: double
child 4, REM: double
child 4, support: struct<W: int64, N1: int64, N2: int64, N3: int64, REM: int64>
child 0, W: int64
child 1, N1: int64
child 2, N2: int64
child 3, N3: int64
child 4, REM: int64
child 5, confusion_matrix: list<item: list<item: int64>>
child 0, item: list<item: int64>
child 0, item: int64
probe_config: struct<max_epochs: int64, lr: double, weight_decay: double, batch_size: int64>
child 0, max_epochs: int64
child 1, lr: double
child 2, weight_decay: double
child 3, batch_size: int64
to
{'model_name': Value('string'), 'dataset_name': Value('string'), 'n_folds': Value('int64'), 'n_classes': Value('int64'), 'class_names': List(Value('string')), 'n_subjects': Value('int64'), 'probe_config': {'max_epochs': Value('int64'), 'lr': Value('float64'), 'weight_decay': Value('float64'), 'batch_size': Value('int64')}, 'per_fold': List({'fold': Value('int64'), 'accuracy': Value('float64'), 'macro_f1': Value('float64'), 'kappa': Value('float64'), 'per_class_f1': {'W': Value('float64'), 'N1': Value('float64'), 'N2': Value('float64'), 'N3': Value('float64'), 'REM': Value('float64')}, 'support': {'W': Value('int64'), 'N1': Value('int64'), 'N2': Value('int64'), 'N3': Value('int64'), 'REM': Value('int64')}, 'n_train_subjects': Value('int64'), 'n_test_subjects': Value('int64'), 'n_train_epochs': Value('int64'), 'n_test_epochs': Value('int64'), 'confusion_matrix': List(List(Value('int64')))}), 'pooled': {'accuracy': Value('float64'), 'macro_f1': Value('float64'), 'kappa': Value('float64'), 'per_class_f1': {'W': Value('float64'), 'N1': Value('float64'), 'N2': Value('float64'), 'N3': Value('float64'), 'REM': Value('float64')}, 'support': {'W': Value('int64'), 'N1': Value('int64'), 'N2': Value('int64'), 'N3': Value('int64'), 'REM': Value('int64')}, 'confusion_matrix': List(List(Value('int64')))}, 'mean_std': {'accuracy': {'mean': Value('float64'), 'std': Value('float64')}, 'macro_f1': {'mean': Value('float64'), 'std': Value('float64')}, 'kappa': {'mean': Value('float64'), 'std': Value('float64')}}}
because column names don't match
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 99, in get_rows_or_raise
return get_rows(
^^^^^^^^^
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 77, in get_rows
rows_plus_one = list(itertools.islice(ds, rows_max_number + 1))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2690, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2227, in __iter__
for key, pa_table in self._iter_arrow():
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2251, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 494, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 384, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 295, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 128, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2321, in table_cast
return cast_table_to_schema(table, schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2249, in cast_table_to_schema
raise CastError(
datasets.table.CastError: Couldn't cast
model_name: string
dataset_name: string
embedding_dim: int64
n_subjects: int64
per_fold: list<item: struct<fold: int64, accuracy: double, macro_f1: double, kappa: double, per_class_f1: stru (... 279 chars omitted)
child 0, item: struct<fold: int64, accuracy: double, macro_f1: double, kappa: double, per_class_f1: struct<W: doubl (... 267 chars omitted)
child 0, fold: int64
child 1, accuracy: double
child 2, macro_f1: double
child 3, kappa: double
child 4, per_class_f1: struct<W: double, N1: double, N2: double, N3: double, REM: double>
child 0, W: double
child 1, N1: double
child 2, N2: double
child 3, N3: double
child 4, REM: double
child 5, support: struct<W: int64, N1: int64, N2: int64, N3: int64, REM: int64>
child 0, W: int64
child 1, N1: int64
child 2, N2: int64
child 3, N3: int64
child 4, REM: int64
child 6, n_train_subjects: int64
child 7, n_test_subjects: int64
child 8, n_train_epochs: int64
child 9, n_test_epochs: int64
child 10, confusion_matrix: list<item: list<item: int64>>
child 0, item: list<item: int64>
child 0, item: int64
n_folds: int64
n_classes: int64
mean_std: struct<accuracy: struct<mean: double, std: double>, macro_f1: struct<mean: double, std: double>, kap (... 38 chars omitted)
child 0, accuracy: struct<mean: double, std: double>
child 0, mean: double
child 1, std: double
child 1, macro_f1: struct<mean: double, std: double>
child 0, mean: double
child 1, std: double
child 2, kappa: struct<mean: double, std: double>
child 0, mean: double
child 1, std: double
class_names: list<item: string>
child 0, item: string
pooled: struct<accuracy: double, macro_f1: double, kappa: double, per_class_f1: struct<W: double, N1: double (... 160 chars omitted)
child 0, accuracy: double
child 1, macro_f1: double
child 2, kappa: double
child 3, per_class_f1: struct<W: double, N1: double, N2: double, N3: double, REM: double>
child 0, W: double
child 1, N1: double
child 2, N2: double
child 3, N3: double
child 4, REM: double
child 4, support: struct<W: int64, N1: int64, N2: int64, N3: int64, REM: int64>
child 0, W: int64
child 1, N1: int64
child 2, N2: int64
child 3, N3: int64
child 4, REM: int64
child 5, confusion_matrix: list<item: list<item: int64>>
child 0, item: list<item: int64>
child 0, item: int64
probe_config: struct<max_epochs: int64, lr: double, weight_decay: double, batch_size: int64>
child 0, max_epochs: int64
child 1, lr: double
child 2, weight_decay: double
child 3, batch_size: int64
to
{'model_name': Value('string'), 'dataset_name': Value('string'), 'n_folds': Value('int64'), 'n_classes': Value('int64'), 'class_names': List(Value('string')), 'n_subjects': Value('int64'), 'probe_config': {'max_epochs': Value('int64'), 'lr': Value('float64'), 'weight_decay': Value('float64'), 'batch_size': Value('int64')}, 'per_fold': List({'fold': Value('int64'), 'accuracy': Value('float64'), 'macro_f1': Value('float64'), 'kappa': Value('float64'), 'per_class_f1': {'W': Value('float64'), 'N1': Value('float64'), 'N2': Value('float64'), 'N3': Value('float64'), 'REM': Value('float64')}, 'support': {'W': Value('int64'), 'N1': Value('int64'), 'N2': Value('int64'), 'N3': Value('int64'), 'REM': Value('int64')}, 'n_train_subjects': Value('int64'), 'n_test_subjects': Value('int64'), 'n_train_epochs': Value('int64'), 'n_test_epochs': Value('int64'), 'confusion_matrix': List(List(Value('int64')))}), 'pooled': {'accuracy': Value('float64'), 'macro_f1': Value('float64'), 'kappa': Value('float64'), 'per_class_f1': {'W': Value('float64'), 'N1': Value('float64'), 'N2': Value('float64'), 'N3': Value('float64'), 'REM': Value('float64')}, 'support': {'W': Value('int64'), 'N1': Value('int64'), 'N2': Value('int64'), 'N3': Value('int64'), 'REM': Value('int64')}, 'confusion_matrix': List(List(Value('int64')))}, 'mean_std': {'accuracy': {'mean': Value('float64'), 'std': Value('float64')}, 'macro_f1': {'mean': Value('float64'), 'std': Value('float64')}, 'kappa': {'mean': Value('float64'), 'std': Value('float64')}}}
because column names don't matchNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
TinySleepNet-Supratak Embeddings
Pre-extracted contextualized per-epoch embeddings from TinySleepNet (Supratak & Guo 2020), trained on Sleep-EDF via PhysioEx.
Each subject directory contains:
embeddings.npy—(n_epochs, 128)contextualized epoch embeddings (bfloat16)labels.npy—(n_epochs,)AASM sleep stage labels (W=0, N1=1, N2=2, N3=3, REM=4, unscored=-1)
Usage
from physioex.models import load_embeddings
path = load_embeddings("tinysleepnet-supratak", "hmc", verbose=True)
Linear Probe Results (5-fold subject-wise CV)
| Dataset | Subjects | ACC | MF1 | κ | F1-W | F1-N1 | F1-N2 | F1-N3 | F1-REM |
|---|---|---|---|---|---|---|---|---|---|
| sleepedf | 153 | 0.8754 | 0.8330 | 0.8278 | 0.95 | 0.60 | 0.89 | 0.84 | 0.89 |
| mass_ss05 | 26 | 0.8620 | 0.7873 | 0.7986 | 0.82 | 0.48 | 0.90 | 0.87 | 0.87 |
| mass_ss02 | 19 | 0.8545 | 0.7745 | 0.7862 | 0.82 | 0.44 | 0.90 | 0.87 | 0.83 |
| mass_ss04 | 40 | 0.8432 | 0.7768 | 0.7746 | 0.82 | 0.48 | 0.90 | 0.84 | 0.84 |
| mass_ss03 | 62 | 0.8397 | 0.7751 | 0.7616 | 0.84 | 0.49 | 0.89 | 0.82 | 0.84 |
| dcsm | 255 | 0.8332 | 0.7212 | 0.7552 | 0.91 | 0.32 | 0.81 | 0.82 | 0.74 |
| shhs_visit2 | 2651 | 0.8159 | 0.7095 | 0.7375 | 0.86 | 0.27 | 0.85 | 0.83 | 0.75 |
| shhs_visit1 | 5793 | 0.8044 | 0.7083 | 0.7198 | 0.84 | 0.31 | 0.83 | 0.80 | 0.75 |
| mass_ss01 | 53 | 0.7966 | 0.7423 | 0.7124 | 0.87 | 0.49 | 0.86 | 0.69 | 0.81 |
| stages_GSDV | 232 | 0.7706 | 0.6121 | 0.6261 | 0.77 | 0.18 | 0.84 | 0.56 | 0.70 |
| hpap | 247 | 0.7567 | 0.7040 | 0.6663 | 0.81 | 0.38 | 0.81 | 0.79 | 0.73 |
| mesa | 2056 | 0.7556 | 0.6648 | 0.6499 | 0.82 | 0.34 | 0.81 | 0.62 | 0.74 |
| stages_MSMI | 63 | 0.7549 | 0.6706 | 0.6303 | 0.78 | 0.31 | 0.82 | 0.69 | 0.75 |
| stages_GSSW | 105 | 0.7534 | 0.5568 | 0.5964 | 0.75 | 0.11 | 0.84 | 0.38 | 0.71 |
| stages_GSLH | 45 | 0.7518 | 0.6254 | 0.6077 | 0.79 | 0.26 | 0.83 | 0.61 | 0.64 |
| stages_MSQW | 153 | 0.7468 | 0.6564 | 0.6265 | 0.77 | 0.42 | 0.84 | 0.54 | 0.71 |
| stages_GSBB | 30 | 0.7369 | 0.6286 | 0.6038 | 0.84 | 0.27 | 0.80 | 0.62 | 0.61 |
| stages_GSSA | 26 | 0.7348 | 0.5183 | 0.5279 | 0.65 | 0.02 | 0.82 | 0.46 | 0.64 |
| hmc | 151 | 0.7271 | 0.6837 | 0.6387 | 0.77 | 0.36 | 0.76 | 0.79 | 0.75 |
| stages_STLK | 158 | 0.7240 | 0.5987 | 0.5814 | 0.75 | 0.24 | 0.80 | 0.50 | 0.71 |
| stages_STNF | 460 | 0.6055 | 0.5369 | 0.4687 | 0.68 | 0.13 | 0.63 | 0.70 | 0.55 |
| stages_MSNF | 38 | 0.5200 | 0.3414 | 0.2392 | 0.50 | 0.02 | 0.65 | 0.35 | 0.19 |
| stages_MSTR | 285 | 0.5181 | 0.3448 | 0.2159 | 0.43 | 0.00 | 0.65 | 0.35 | 0.29 |
| stages_BOGN | 85 | 0.5080 | 0.3543 | 0.2355 | 0.44 | 0.04 | 0.63 | 0.29 | 0.36 |
| stages_MSTH | 31 | 0.4946 | 0.1712 | 0.0219 | 0.17 | 0.00 | 0.66 | 0.01 | 0.02 |
Model Details
- Architecture: TinySleepNet (Supratak & Guo 2020) — CNN feature extractor + LSTM sequence encoder
- Training data: Sleep-EDF (153 subjects, single EEG channel)
- Pipeline:
raw(bandpass 0.3-40 Hz, resample 100 Hz) - Sequence length: L=20 epochs
- Embedding dim: 128
Datasets
| Dataset | Source | URL |
|---|---|---|
| Sleep-EDF | PhysioNet | https://physionet.org/content/sleep-edfx/1.0.0/ |
| HMC | PhysioNet | https://physionet.org/content/hmc-sleep-staging/1.1/ |
| DCSM | ERDA/KU | https://erda.ku.dk/public/archives/db553715ecbe1f3ac66c1dc569826eef/published-archive.html |
| SHHS | NSRR | https://sleepdata.org/datasets/shhs |
| MESA | NSRR | https://sleepdata.org/datasets/mesa |
| HomePAP | NSRR | https://sleepdata.org/datasets/homepap |
| STAGES | NSRR | https://sleepdata.org/datasets/stages |
| MASS | CEAMS | http://ceams-carsm.ca/mass/ |
Citations
@article{gagliardi2025physioex,
author={Gagliardi, Guido and Alfeo, Luca and Cimino, Mario G C A and Valenza, Gaetano and De Vos, Maarten},
title={PhysioEx, a new Python library for explainable sleep staging through deep learning},
journal={Physiological Measurement},
url={http://iopscience.iop.org/article/10.1088/1361-6579/adaf73},
year={2025},
}
@inproceedings{supratak2020tinysleepnet,
title={TinySleepNet: An Efficient Deep Learning Model for Sleep Stage Scoring based on Raw Single-Channel EEG},
author={Supratak, Akara and Guo, Yike},
booktitle={IEEE EMBC},
year={2020},
}
- Downloads last month
- 973