Upload 8 files
Browse files- .gitattributes +4 -0
- LICENSE.txt +14 -0
- README.md +226 -3
- data/hospital_deterioration_hourly_panel.csv +3 -0
- data/hospital_deterioration_ml_ready.csv +3 -0
- data/labs_timeseries.csv +3 -0
- data/patients.csv +0 -0
- data/vitals_timeseries.csv +3 -0
- docs/data_dictionary.md +157 -0
.gitattributes
CHANGED
|
@@ -57,3 +57,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 57 |
# Video files - compressed
|
| 58 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 59 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
# Video files - compressed
|
| 58 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 59 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 60 |
+
data/hospital_deterioration_hourly_panel.csv filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
data/hospital_deterioration_ml_ready.csv filter=lfs diff=lfs merge=lfs -text
|
| 62 |
+
data/labs_timeseries.csv filter=lfs diff=lfs merge=lfs -text
|
| 63 |
+
data/vitals_timeseries.csv filter=lfs diff=lfs merge=lfs -text
|
LICENSE.txt
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Creative Commons Attribution 4.0 International (CC BY 4.0)
|
| 2 |
+
|
| 3 |
+
You are free to:
|
| 4 |
+
β’ Share β copy and redistribute the material in any medium or format.
|
| 5 |
+
β’ Adapt β remix, transform, and build upon the material for any purpose, even commercially.
|
| 6 |
+
|
| 7 |
+
Under the following terms:
|
| 8 |
+
β’ Attribution β You must give appropriate credit, provide a link to the license,
|
| 9 |
+
and indicate if changes were made, without suggesting endorsement.
|
| 10 |
+
|
| 11 |
+
Full license text: https://creativecommons.org/licenses/by/4.0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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- tabular-classification
|
| 5 |
+
- time-series-forecasting
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
tags:
|
| 9 |
+
- healthcare
|
| 10 |
+
- clinical
|
| 11 |
+
- hospital
|
| 12 |
+
- early warning
|
| 13 |
+
- sepsis
|
| 14 |
+
- deterioration
|
| 15 |
+
- time series
|
| 16 |
+
- tabular data
|
| 17 |
+
- machine learning
|
| 18 |
+
- classification
|
| 19 |
+
- risk prediction
|
| 20 |
+
- synthetic data
|
| 21 |
+
- open dataset
|
| 22 |
+
- kaggle
|
| 23 |
+
pretty_name: Hospital Deterioration β Simulated Early Warning
|
| 24 |
+
size_categories:
|
| 25 |
+
- 100K<n<1M
|
| 26 |
+
---
|
| 27 |
+
|
| 28 |
+
# π₯ Hospital Deterioration β Simulated Early Warning
|
| 29 |
+
### Clinical Time-Series Benchmark for Early Warning Models
|
| 30 |
+
|
| 31 |
+
A fully simulated **hospital cohort** for building and testing **early warning models** and **clinical deterioration risk scores**.
|
| 32 |
+
Each admission includes up to **72 hours** of hourly data: vitals, labs, patient context, and multiple deterioration outcomes β with a main label for **βdeterioration in the next 12 hoursβ**.
|
| 33 |
+
|
| 34 |
+
All records are **fully simulated**, **internally consistent**, and contain **no missing values**, making the dataset directly usable for **machine learning** and **time-series modeling**.
|
| 35 |
+
|
| 36 |
+
---
|
| 37 |
+
|
| 38 |
+
## β οΈ Simulation & Privacy
|
| 39 |
+
|
| 40 |
+
- No row corresponds to a real patient or a real hospital.
|
| 41 |
+
- All values are generated through a simulation pipeline designed to create **plausible clinical patterns**, not to reproduce real EHR data.
|
| 42 |
+
- The dataset is intended for **research, education, and prototyping**, not for real clinical decision-making.
|
| 43 |
+
|
| 44 |
+
---
|
| 45 |
+
|
| 46 |
+
## π Dataset Overview
|
| 47 |
+
|
| 48 |
+
| Field | Description |
|
| 49 |
+
|---------------|-----------------------------------------------------------------------------|
|
| 50 |
+
| **Files** | `patients.csv`, `vitals_timeseries.csv`, `labs_timeseries.csv`, `hospital_deterioration_hourly_panel.csv`, `hospital_deterioration_ml_ready.csv` |
|
| 51 |
+
| **Patients** | 10,000 admissions (one row per patient in `patients.csv`) |
|
| 52 |
+
| **Time span** | Up to 72 hours of follow-up per admission (`hour_from_admission` = 0β71) |
|
| 53 |
+
| **Granularity** | Hourly time series per patient (vitals, labs, labels) |
|
| 54 |
+
| **Main target** | `deterioration_next_12h` (binary label, 0/1) |
|
| 55 |
+
| **Type** | Tabular / time-series (simulated) |
|
| 56 |
+
|
| 57 |
+
---
|
| 58 |
+
|
| 59 |
+
## π§ Feature Groups
|
| 60 |
+
|
| 61 |
+
### π§ Patient-Level Features (`patients.csv`)
|
| 62 |
+
|
| 63 |
+
- `patient_id`
|
| 64 |
+
- `age`, `gender`
|
| 65 |
+
- `comorbidity_index`
|
| 66 |
+
- `admission_type` (ED / Elective / Transfer)
|
| 67 |
+
- `baseline_risk_score` (latent baseline deterioration risk, 0β1)
|
| 68 |
+
- `los_hours` (length of stay, 12β72 hours)
|
| 69 |
+
- Deterioration summary outcomes:
|
| 70 |
+
- `deterioration_event`
|
| 71 |
+
- `deterioration_within_12h_from_admission`
|
| 72 |
+
- `deterioration_hour` (or -1 if no event)
|
| 73 |
+
|
| 74 |
+
---
|
| 75 |
+
|
| 76 |
+
### π Hourly Vitals (`vitals_timeseries.csv`)
|
| 77 |
+
|
| 78 |
+
Per `(patient_id, hour_from_admission)`:
|
| 79 |
+
|
| 80 |
+
- `heart_rate`, `respiratory_rate`
|
| 81 |
+
- `spo2_pct`, `temperature_c`
|
| 82 |
+
- `systolic_bp`, `diastolic_bp`
|
| 83 |
+
- `oxygen_device`, `oxygen_flow`
|
| 84 |
+
- `mobility_score`
|
| 85 |
+
- `nurse_alert`
|
| 86 |
+
|
| 87 |
+
**Consistency rule:**
|
| 88 |
+
When `oxygen_device == "none"`, `oxygen_flow` is always `0.0`.
|
| 89 |
+
|
| 90 |
+
---
|
| 91 |
+
|
| 92 |
+
### π§ͺ Hourly Labs (`labs_timeseries.csv`)
|
| 93 |
+
|
| 94 |
+
Per `(patient_id, hour_from_admission)`:
|
| 95 |
+
|
| 96 |
+
- `wbc_count`
|
| 97 |
+
- `lactate`
|
| 98 |
+
- `creatinine`
|
| 99 |
+
- `crp_level`
|
| 100 |
+
- `hemoglobin`
|
| 101 |
+
- `sepsis_risk_score` (latent hourly sepsis risk, 0β1)
|
| 102 |
+
|
| 103 |
+
---
|
| 104 |
+
|
| 105 |
+
### π§Ύ Joined Panel & ML-Ready View
|
| 106 |
+
|
| 107 |
+
- `hospital_deterioration_hourly_panel.csv`
|
| 108 |
+
- One row per `(patient_id, hour_from_admission)`
|
| 109 |
+
- Joins **vitals + labs + patient-level features + all deterioration labels**
|
| 110 |
+
- Useful for custom label definitions, multi-task learning, and advanced feature engineering.
|
| 111 |
+
|
| 112 |
+
- `hospital_deterioration_ml_ready.csv`
|
| 113 |
+
- Same hourly granularity
|
| 114 |
+
- **Features only** (vitals, labs, static features)
|
| 115 |
+
- **Single target**: `deterioration_next_12h` (0/1)
|
| 116 |
+
- Recommended entry point for most ML tasks.
|
| 117 |
+
|
| 118 |
+
---
|
| 119 |
+
|
| 120 |
+
## π― Target Definition β `deterioration_next_12h`
|
| 121 |
+
|
| 122 |
+
The main label is:
|
| 123 |
+
|
| 124 |
+
- `deterioration_next_12h = 1`
|
| 125 |
+
if a deterioration event happens **after the current hour** and **within the next 12 hours**.
|
| 126 |
+
|
| 127 |
+
- `deterioration_next_12h = 0`
|
| 128 |
+
if:
|
| 129 |
+
- there is **no event** in the stay, or
|
| 130 |
+
- the event is happening **now**, or
|
| 131 |
+
- it happens **more than 12 hours** later.
|
| 132 |
+
|
| 133 |
+
This framing mirrors real-world **early warning systems**:
|
| 134 |
+
the model should trigger an alert **before** the deterioration happens, not at the same time.
|
| 135 |
+
|
| 136 |
+
---
|
| 137 |
+
|
| 138 |
+
## π Example Usage
|
| 139 |
+
|
| 140 |
+
```python
|
| 141 |
+
from datasets import load_dataset
|
| 142 |
+
|
| 143 |
+
dataset = load_dataset("TarekMasryo/hospital-deterioration-early-warning")
|
| 144 |
+
|
| 145 |
+
# Load ML-ready split as a pandas DataFrame
|
| 146 |
+
df = dataset["train"].to_pandas()
|
| 147 |
+
|
| 148 |
+
X = df.drop(columns=["deterioration_next_12h"])
|
| 149 |
+
y = df["deterioration_next_12h"]
|
| 150 |
+
|
| 151 |
+
print(X.shape, y.mean())
|
| 152 |
+
```
|
| 153 |
+
|
| 154 |
+
To reconstruct a full hourly panel from separate files (if you export them):
|
| 155 |
+
|
| 156 |
+
```python
|
| 157 |
+
import pandas as pd
|
| 158 |
+
|
| 159 |
+
patients = pd.read_csv("patients.csv")
|
| 160 |
+
vitals = pd.read_csv("vitals_timeseries.csv")
|
| 161 |
+
labs = pd.read_csv("labs_timeseries.csv")
|
| 162 |
+
|
| 163 |
+
panel = (
|
| 164 |
+
vitals
|
| 165 |
+
.merge(labs, on=["patient_id", "hour_from_admission"], how="inner")
|
| 166 |
+
.merge(patients, on="patient_id", how="left")
|
| 167 |
+
)
|
| 168 |
+
|
| 169 |
+
print(panel.shape)
|
| 170 |
+
```
|
| 171 |
+
|
| 172 |
+
---
|
| 173 |
+
|
| 174 |
+
## π¬ Research & Applications
|
| 175 |
+
|
| 176 |
+
- Early warning models for **clinical deterioration**
|
| 177 |
+
- Sepsis and high-risk trajectory modeling
|
| 178 |
+
- Sequence models over **hourly vitals + labs**
|
| 179 |
+
- Risk score calibration and interpretability (e.g., SHAP, partial dependence)
|
| 180 |
+
- Threshold tuning and policy design (balancing recall vs false alarms)
|
| 181 |
+
- Teaching end-to-end **clinical ML pipelines** without real-patient data
|
| 182 |
+
|
| 183 |
+
---
|
| 184 |
+
|
| 185 |
+
## π§© Reproducibility
|
| 186 |
+
|
| 187 |
+
- No missing values
|
| 188 |
+
- Clean numeric + categorical schema
|
| 189 |
+
- Hourly-aligned time indexing (`hour_from_admission`)
|
| 190 |
+
- Suitable for:
|
| 191 |
+
- Classic ML (tree-based models, logistic regression)
|
| 192 |
+
- Deep learning (RNNs, Temporal CNNs, Transformers)
|
| 193 |
+
- Survival-like / time-to-event framing with custom labels
|
| 194 |
+
|
| 195 |
+
---
|
| 196 |
+
|
| 197 |
+
## π§ Ethical Considerations
|
| 198 |
+
|
| 199 |
+
- This dataset is **simulated** and must **not** be used for clinical decisions.
|
| 200 |
+
- Patterns are **plausible**, not calibrated to any specific hospital, region, or population.
|
| 201 |
+
- Any model trained on this data requires:
|
| 202 |
+
- Validation on real EHR data
|
| 203 |
+
- Clinical oversight
|
| 204 |
+
- Regulatory and ethical review before deployment.
|
| 205 |
+
|
| 206 |
+
Treat this dataset as a **simulation benchmark** and a **teaching tool**, not as a substitute for real-world evidence.
|
| 207 |
+
|
| 208 |
+
---
|
| 209 |
+
|
| 210 |
+
## π Citation
|
| 211 |
+
|
| 212 |
+
If you use this dataset, please cite:
|
| 213 |
+
|
| 214 |
+
> Tarek Masryo. βHospital Deterioration β Simulated Early Warning.β
|
| 215 |
+
> Simulation benchmark dataset for early clinical deterioration modeling and time-series ML.
|
| 216 |
+
|
| 217 |
+
You may also cite the Hugging Face dataset URL and any associated GitHub repository or notebooks.
|
| 218 |
+
|
| 219 |
+
---
|
| 220 |
+
|
| 221 |
+
## π License
|
| 222 |
+
|
| 223 |
+
**CC BY 4.0 (Attribution Required)**
|
| 224 |
+
|
| 225 |
+
Free to use, share, and modify with proper attribution.
|
| 226 |
+
For full license terms: https://creativecommons.org/licenses/by/4.0/
|
data/hospital_deterioration_hourly_panel.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:98817e3f1b3751593ea50f8610785891b7b478a15e4150e682f40ce1ed769fa8
|
| 3 |
+
size 50892395
|
data/hospital_deterioration_ml_ready.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5656f812cdb968b0464b0533af82f60645ec1958afb3b710d7637744cb3413ad
|
| 3 |
+
size 41797018
|
data/labs_timeseries.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fe2831fb74d56ed4f665bb31ad48c5f7658798bedeb962c9a45cfd2fba94f8c5
|
| 3 |
+
size 17598685
|
data/patients.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
data/vitals_timeseries.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:79f6cba7bf64345aa25709e6b07836999a71754d2f4e0dbbc247d2144f7b39f1
|
| 3 |
+
size 23947111
|
docs/data_dictionary.md
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|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terioration modeling.
|
| 5 |
+
|
| 6 |
+
The records are generated via a rules-based and probabilistic simulation calibrated
|
| 7 |
+
to typical hospital patterns. They **do not correspond to real patients** and contain
|
| 8 |
+
no identifiable information.
|
| 9 |
+
|
| 10 |
+
- Time is expressed as **hours from admission**.
|
| 11 |
+
- Each patient stay is capped at **72 hours**.
|
| 12 |
+
- All identifiers (`patient_id`) are artificial and non-identifiable.
|
| 13 |
+
- All features are fully observed (no missing values).
|
| 14 |
+
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
## 1. `patients.csv` β Patient-level static data
|
| 18 |
+
|
| 19 |
+
**Granularity:** one row per patient (10,000 patients).
|
| 20 |
+
|
| 21 |
+
| column_name | type | description | allowed_values / range | missing_values |
|
| 22 |
+
|-------------------------------------------|-----------|----------------------------------------------------------------------------------------------|----------------------------------------------------------|----------------|
|
| 23 |
+
| `patient_id` | int | Unique patient identifier | 1β10,000 | None |
|
| 24 |
+
| `age` | int | Age at admission (years) | 18β90 | None |
|
| 25 |
+
| `gender` | category | Biological sex | `"M"`, `"F"` | None |
|
| 26 |
+
| `comorbidity_index` | int | Aggregate comorbidity burden (higher = more chronic disease) | 0β8 | None |
|
| 27 |
+
| `admission_type` | category | Admission route to the hospital | `"ED"`, `"Elective"`, `"Transfer"` | None |
|
| 28 |
+
| `baseline_risk_score` | float | Latent **baseline deterioration risk** at admission on a 0β1 scale (simulation parameter, not a clinical score) | ~0.03β0.98 | None |
|
| 29 |
+
| `los_hours` | int | Length of stay in hours (capped at 72 hours) | 12β72 | None |
|
| 30 |
+
| `deterioration_event` | int (0/1) | Indicator for any clinical deterioration event during the stay | 0 = no event, 1 = at least one event | None |
|
| 31 |
+
| `deterioration_within_12h_from_admission` | int (0/1) | Deterioration event occurs within the first 12 hours from admission | 0, 1 | None |
|
| 32 |
+
| `deterioration_hour` | int | Hour-from-admission of the **first** deterioration event; `-1` means no event during the stay | -1 (no event) or 0β(los_hours - 1) (up to 71 in this dataset) | None |
|
| 33 |
+
|
| 34 |
+
---
|
| 35 |
+
|
| 36 |
+
## 2. `vitals_timeseries.csv` β Hourly vital signs
|
| 37 |
+
|
| 38 |
+
**Granularity:** one row per `(patient_id, hour_from_admission)` for vital signs.
|
| 39 |
+
|
| 40 |
+
| column_name | type | description | allowed_values / range | missing_values |
|
| 41 |
+
|-----------------------|-----------|-----------------------------------------------------------------------------|----------------------------------------------------------|----------------|
|
| 42 |
+
| `patient_id` | int | Patient identifier (matches `patients.csv`) | 1β10,000 | None |
|
| 43 |
+
| `hour_from_admission` | int | Hour index from admission (0 = admission hour) | 0β(los_hours - 1), up to 71 in this dataset | None |
|
| 44 |
+
| `heart_rate` | float | Heart rate at that hour (beats per minute) | ~40β180 | None |
|
| 45 |
+
| `respiratory_rate` | float | Respiratory rate at that hour (breaths per minute) | ~8β45 | None |
|
| 46 |
+
| `spo2_pct` | float | Peripheral oxygen saturation percentage | ~70β100 | None |
|
| 47 |
+
| `temperature_c` | float | Body temperature in degrees Celsius | ~35.2β40.5 | None |
|
| 48 |
+
| `systolic_bp` | float | Systolic blood pressure (mmHg) | ~70β185 | None |
|
| 49 |
+
| `diastolic_bp` | float | Diastolic blood pressure (mmHg) | ~40β110 | None |
|
| 50 |
+
| `oxygen_device` | category | Type of oxygen delivery device | `"none"`, `"nasal"`, `"mask"`, `"hfnc"`, `"niv"` | None |
|
| 51 |
+
| `oxygen_flow` | float | Oxygen flow rate (liters per minute). Exactly `0.0` whenever `oxygen_device == "none"`, and strictly positive only when an oxygen device is in use. | 0β~60 (only >0 for `"nasal"`, `"mask"`, `"hfnc"`, `"niv"`) | None |
|
| 52 |
+
| `mobility_score` | int | Ordinal mobility score (higher = more independent) | 0β4 (ordinal scale) | None |
|
| 53 |
+
| `nurse_alert` | int (0/1) | Whether a nurse alert was triggered in that hour | 0, 1 | None |
|
| 54 |
+
|
| 55 |
+
---
|
| 56 |
+
|
| 57 |
+
## 3. `labs_timeseries.csv` β Hourly lab results
|
| 58 |
+
|
| 59 |
+
**Granularity:** one row per `(patient_id, hour_from_admission)` for lab values.
|
| 60 |
+
|
| 61 |
+
| column_name | type | description | allowed_values / range | missing_values |
|
| 62 |
+
|-----------------------|-----------|-----------------------------------------------------------------------------|----------------------------------------------|----------------|
|
| 63 |
+
| `patient_id` | int | Patient identifier (matches `patients.csv`) | 1β10,000 | None |
|
| 64 |
+
| `hour_from_admission` | int | Hour index from admission (aligned with vital signs) | 0β(los_hours - 1), up to 71 in this dataset | None |
|
| 65 |
+
| `wbc_count` | float | White blood cell count (arbitrary clinical units, simulation-based) | ~2β30 | None |
|
| 66 |
+
| `lactate` | float | Serum lactate level (approx. mmol/L) | ~0.5β8.0 | None |
|
| 67 |
+
| `creatinine` | float | Serum creatinine (approx. mg/dL) | ~0.4β4.5 | None |
|
| 68 |
+
| `crp_level` | float | C-reactive protein level (approx. mg/L) | ~0β250 | None |
|
| 69 |
+
| `hemoglobin` | float | Hemoglobin concentration (approx. g/dL) | ~7β17 | None |
|
| 70 |
+
| `sepsis_risk_score` | float | Latent **sepsis risk** score at that hour on a 0β1 scale (simulation parameter) | ~0.02β1.00 | None |
|
| 71 |
+
|
| 72 |
+
---
|
| 73 |
+
|
| 74 |
+
## 4. `hospital_deterioration_hourly_panel.csv` β Full joined hourly panel
|
| 75 |
+
|
| 76 |
+
**Granularity:** one row per `(patient_id, hour_from_admission)` combining:
|
| 77 |
+
|
| 78 |
+
- Hourly vital signs
|
| 79 |
+
- Hourly lab values
|
| 80 |
+
- Static patient features
|
| 81 |
+
- All deterioration labels
|
| 82 |
+
|
| 83 |
+
This file is convenient for EDA and modeling where you want everything in one table.
|
| 84 |
+
|
| 85 |
+
| column_name | type | description | allowed_values / range | missing_values |
|
| 86 |
+
|-------------------------------------------|-----------|-----------------------------------------------------------------------------------------------------------|----------------------------------------------------------|----------------|
|
| 87 |
+
| `patient_id` | int | Patient identifier | 1β10,000 | None |
|
| 88 |
+
| `hour_from_admission` | int | Hour index from admission | 0β(los_hours - 1), up to 71 in this dataset | None |
|
| 89 |
+
| `heart_rate` | float | Heart rate (beats per minute) at this hour | ~40β180 | None |
|
| 90 |
+
| `respiratory_rate` | float | Respiratory rate (breaths per minute) | ~8β45 | None |
|
| 91 |
+
| `spo2_pct` | float | Peripheral oxygen saturation (%) | ~70β100 | None |
|
| 92 |
+
| `temperature_c` | float | Body temperature in Β°C | ~35.2β40.5 | None |
|
| 93 |
+
| `systolic_bp` | float | Systolic blood pressure (mmHg) | ~70β185 | None |
|
| 94 |
+
| `diastolic_bp` | float | Diastolic blood pressure (mmHg) | ~40β110 | None |
|
| 95 |
+
| `oxygen_device` | category | Oxygen delivery device | `"none"`, `"nasal"`, `"mask"`, `"hfnc"`, `"niv"` | None |
|
| 96 |
+
| `oxygen_flow` | float | Oxygen flow rate (L/min). Exactly `0.0` whenever `oxygen_device == "none"`, and strictly positive only when an oxygen device is in use. | 0β~60 (only >0 for `"nasal"`, `"mask"`, `"hfnc"`, `"niv"`) | None |
|
| 97 |
+
| `mobility_score` | int | Ordinal mobility score | 0β4 | None |
|
| 98 |
+
| `nurse_alert` | int (0/1) | Nurse alert triggered during this hour | 0, 1 | None |
|
| 99 |
+
| `wbc_count` | float | White blood cell count | ~2β30 | None |
|
| 100 |
+
| `lactate` | float | Serum lactate | ~0.5β8.0 | None |
|
| 101 |
+
| `creatinine` | float | Serum creatinine | ~0.4β4.5 | None |
|
| 102 |
+
| `crp_level` | float | C-reactive protein | ~0β250 | None |
|
| 103 |
+
| `hemoglobin` | float | Hemoglobin | ~7β17 | None |
|
| 104 |
+
| `sepsis_risk_score` | float | Latent sepsis risk score (0β1) | ~0.02β1.00 | None |
|
| 105 |
+
| `age` | int | Age at admission | 18β90 | None |
|
| 106 |
+
| `gender` | category | Biological sex | `"M"`, `"F"` | None |
|
| 107 |
+
| `comorbidity_index` | int | Aggregate comorbidity burden | 0β8 | None |
|
| 108 |
+
| `admission_type` | category | Admission route | `"ED"`, `"Elective"`, `"Transfer"` | None |
|
| 109 |
+
| `baseline_risk_score` | float | Latent baseline deterioration risk at admission on a 0β1 scale (simulation parameter) | ~0.03β0.98 | None |
|
| 110 |
+
| `los_hours` | int | Length of stay in hours | 12β72 | None |
|
| 111 |
+
| `deterioration_event` | int (0/1) | Any deterioration event during the stay | 0, 1 | None |
|
| 112 |
+
| `deterioration_within_12h_from_admission` | int (0/1) | Deterioration occurs within the first 12 hours | 0, 1 | None |
|
| 113 |
+
| `deterioration_hour` | int | Hour of first deterioration event; `-1` = no event | -1 (no event) or 0β(los_hours - 1) | None |
|
| 114 |
+
| `deterioration_next_12h` | int (0/1) | Label: deterioration occurs **after this hour** and **within the next 12 hours** (see definition below) | 0, 1 | None |
|
| 115 |
+
|
| 116 |
+
**Definition of `deterioration_next_12h`:**
|
| 117 |
+
|
| 118 |
+
For a given row with `(patient_id, hour_from_admission = t)` and corresponding `deterioration_hour = h`:
|
| 119 |
+
|
| 120 |
+
- `deterioration_next_12h = 1` if `t < h β€ t + 12`
|
| 121 |
+
- `deterioration_next_12h = 0` otherwise (including no event in the stay).
|
| 122 |
+
|
| 123 |
+
---
|
| 124 |
+
|
| 125 |
+
## 5. `hospital_deterioration_ml_ready.csv` β ML-ready classification panel
|
| 126 |
+
|
| 127 |
+
**Granularity:** one row per hourly observation (per patient and `hour_from_admission`).
|
| 128 |
+
**Intended use:** feed directly into ML models for **next-12h deterioration prediction**.
|
| 129 |
+
|
| 130 |
+
This file keeps only **features + target**, and omits identifiers and auxiliary targets to reduce leakage risk.
|
| 131 |
+
|
| 132 |
+
| column_name | type | description | allowed_values / range | missing_values |
|
| 133 |
+
|---------------------------|-----------|-----------------------------------------------------------------------------|----------------------------------------------------------|----------------|
|
| 134 |
+
| `hour_from_admission` | int | Hour index from admission | 0β71 (per-stay capped length in this dataset) | None |
|
| 135 |
+
| `heart_rate` | float | Heart rate (beats per minute) | ~40β180 | None |
|
| 136 |
+
| `respiratory_rate` | float | Respiratory rate (breaths per minute) | ~8β45 | None |
|
| 137 |
+
| `spo2_pct` | float | Peripheral oxygen saturation (%) | ~70β100 | None |
|
| 138 |
+
| `temperature_c` | float | Body temperature (Β°C) | ~35.2β40.5 | None |
|
| 139 |
+
| `systolic_bp` | float | Systolic blood pressure (mmHg) | ~70β185 | None |
|
| 140 |
+
| `diastolic_bp` | float | Diastolic blood pressure (mmHg) | ~40β110 | None |
|
| 141 |
+
| `oxygen_device` | category | Oxygen delivery device | `"none"`, `"nasal"`, `"mask"`, `"hfnc"`, `"niv"` | None |
|
| 142 |
+
| `oxygen_flow` | float | Oxygen flow rate (L/min). Exactly `0.0` whenever `oxygen_device == "none"`, and strictly positive only when an oxygen device is in use. | 0β~60 (only >0 for `"nasal"`, `"mask"`, `"hfnc"`, `"niv"`) | None |
|
| 143 |
+
| `mobility_score` | int | Ordinal mobility score | 0β4 | None |
|
| 144 |
+
| `nurse_alert` | int (0/1) | Nurse alert active in this hour | 0, 1 | None |
|
| 145 |
+
| `wbc_count` | float | White blood cell count | ~2β30 | None |
|
| 146 |
+
| `lactate` | float | Serum lactate | ~0.5β8.0 | None |
|
| 147 |
+
| `creatinine` | float | Serum creatinine | ~0.4β4.5 | None |
|
| 148 |
+
| `crp_level` | float | C-reactive protein | ~0β250 | None |
|
| 149 |
+
| `hemoglobin` | float | Hemoglobin | ~7β17 | None |
|
| 150 |
+
| `sepsis_risk_score` | float | Latent sepsis risk score (0β1) | ~0.02β1.00 | None |
|
| 151 |
+
| `age` | int | Age at admission | 18β90 | None |
|
| 152 |
+
| `gender` | category | Biological sex | `"M"`, `"F"` | None |
|
| 153 |
+
| `comorbidity_index` | int | Aggregate comorbidity burden | 0β8 | None |
|
| 154 |
+
| `admission_type` | category | Admission route | `"ED"`, `"Elective"`, `"Transfer"` | None |
|
| 155 |
+
| `deterioration_next_12h` | int (0/1) | Target label: deterioration occurs **after this hour** and **within the next 12 hours** | 0, 1 | None |
|
| 156 |
+
|
| 157 |
+
The definition of `deterioration_next_12h` is identical to the one in `hospital_deterioration_hourly_panel.csv`.
|