license: cc-by-4.0
task_categories:
- tabular-classification
- time-series-forecasting
language:
- en
tags:
- healthcare
- clinical
- hospital
- early warning
- sepsis
- deterioration
- time series
- tabular data
- machine learning
- classification
- risk prediction
- synthetic data
- open dataset
- kaggle
pretty_name: Hospital Deterioration β Simulated Early Warning
size_categories:
- 100K<n<1M
π₯ Hospital Deterioration β Simulated Early Warning
Clinical Time-Series Benchmark for Early Warning Models
A fully simulated hospital cohort for building and testing early warning models and clinical deterioration risk scores.
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β.
All records are fully simulated, internally consistent, and contain no missing values, making the dataset directly usable for machine learning and time-series modeling.
β οΈ Simulation & Privacy
- No row corresponds to a real patient or a real hospital.
- All values are generated through a simulation pipeline designed to create plausible clinical patterns, not to reproduce real EHR data.
- The dataset is intended for research, education, and prototyping, not for real clinical decision-making.
π Dataset Overview
| Field | Description |
|---|---|
| Files | patients.csv, vitals_timeseries.csv, labs_timeseries.csv, hospital_deterioration_hourly_panel.csv, hospital_deterioration_ml_ready.csv |
| Patients | 10,000 admissions (one row per patient in patients.csv) |
| Time span | Up to 72 hours of follow-up per admission (hour_from_admission = 0β71) |
| Granularity | Hourly time series per patient (vitals, labs, labels) |
| Main target | deterioration_next_12h (binary label, 0/1) |
| Type | Tabular / time-series (simulated) |
π§ Feature Groups
π§ Patient-Level Features (patients.csv)
patient_idage,gendercomorbidity_indexadmission_type(ED / Elective / Transfer)baseline_risk_score(latent baseline deterioration risk, 0β1)los_hours(length of stay, 12β72 hours)- Deterioration summary outcomes:
deterioration_eventdeterioration_within_12h_from_admissiondeterioration_hour(or -1 if no event)
π Hourly Vitals (vitals_timeseries.csv)
Per (patient_id, hour_from_admission):
heart_rate,respiratory_ratespo2_pct,temperature_csystolic_bp,diastolic_bpoxygen_device,oxygen_flowmobility_scorenurse_alert
Consistency rule:
When oxygen_device == "none", oxygen_flow is always 0.0.
π§ͺ Hourly Labs (labs_timeseries.csv)
Per (patient_id, hour_from_admission):
wbc_countlactatecreatininecrp_levelhemoglobinsepsis_risk_score(latent hourly sepsis risk, 0β1)
π§Ύ Joined Panel & ML-Ready View
hospital_deterioration_hourly_panel.csv- One row per
(patient_id, hour_from_admission) - Joins vitals + labs + patient-level features + all deterioration labels
- Useful for custom label definitions, multi-task learning, and advanced feature engineering.
- One row per
hospital_deterioration_ml_ready.csv- Same hourly granularity
- Features only (vitals, labs, static features)
- Single target:
deterioration_next_12h(0/1) - Recommended entry point for most ML tasks.
π― Target Definition β deterioration_next_12h
The main label is:
deterioration_next_12h = 1
if a deterioration event happens after the current hour and within the next 12 hours.deterioration_next_12h = 0
if:- there is no event in the stay, or
- the event is happening now, or
- it happens more than 12 hours later.
This framing mirrors real-world early warning systems:
the model should trigger an alert before the deterioration happens, not at the same time.
π Example Usage
from datasets import load_dataset
dataset = load_dataset("TarekMasryo/hospital-deterioration-early-warning")
# Load ML-ready split as a pandas DataFrame
df = dataset["train"].to_pandas()
X = df.drop(columns=["deterioration_next_12h"])
y = df["deterioration_next_12h"]
print(X.shape, y.mean())
To reconstruct a full hourly panel from separate files (if you export them):
import pandas as pd
patients = pd.read_csv("patients.csv")
vitals = pd.read_csv("vitals_timeseries.csv")
labs = pd.read_csv("labs_timeseries.csv")
panel = (
vitals
.merge(labs, on=["patient_id", "hour_from_admission"], how="inner")
.merge(patients, on="patient_id", how="left")
)
print(panel.shape)
π¬ Research & Applications
- Early warning models for clinical deterioration
- Sepsis and high-risk trajectory modeling
- Sequence models over hourly vitals + labs
- Risk score calibration and interpretability (e.g., SHAP, partial dependence)
- Threshold tuning and policy design (balancing recall vs false alarms)
- Teaching end-to-end clinical ML pipelines without real-patient data
π§© Reproducibility
- No missing values
- Clean numeric + categorical schema
- Hourly-aligned time indexing (
hour_from_admission) - Suitable for:
- Classic ML (tree-based models, logistic regression)
- Deep learning (RNNs, Temporal CNNs, Transformers)
- Survival-like / time-to-event framing with custom labels
π§ Ethical Considerations
- This dataset is simulated and must not be used for clinical decisions.
- Patterns are plausible, not calibrated to any specific hospital, region, or population.
- Any model trained on this data requires:
- Validation on real EHR data
- Clinical oversight
- Regulatory and ethical review before deployment.
Treat this dataset as a simulation benchmark and a teaching tool, not as a substitute for real-world evidence.
π Citation
If you use this dataset, please cite:
Tarek Masryo. βHospital Deterioration β Simulated Early Warning.β
Simulation benchmark dataset for early clinical deterioration modeling and time-series ML.
You may also cite the Hugging Face dataset URL and any associated GitHub repository or notebooks.
π License
CC BY 4.0 (Attribution Required)
Free to use, share, and modify with proper attribution.
For full license terms: https://creativecommons.org/licenses/by/4.0/