Follow the official instructions to obtain access to the MIMIC-III v1.4 clinical dataset from PhysioNet:
🔗 MIMIC-III Access Instructions
Clone and follow the instructions from the official GitHub repository:
🔗 Microsoft/mimic_sepsis Repository
Use the provided SQL scripts and Python code to extract intermediate tables for the sepsis cohort.
Run the following script to derive continuous treatment actions (e.g., IV fluid and vasopressor dosage):
python sepsis_cohort_continous.pyThis forms the action space for RL.
Open and execute:
feat_selection.ipynbThis notebook selects relevant features and produces the final dataset for model input.
To divide the data into training, validation, and test sets, run:
data_split.ipynbTo build the state transition model using k-Nearest Neighbors (kNN):
transition_model.ipynbThis is used for model-based RL algorithms.
Run the following script to compute the Out-of-Distribution (OOD) guardian based on a Gaussian Kernel method:
python guardian.pyThis protects the RL policy from unsafe decisions on out-of-distribution states.
To train different RL models, run the following Python files:
| Model | Script Path |
|---|---|
| CQL | models/ddpg_cql.py |
| CCQL | models/ddpg_cql_ts.py |
| GCQL | models/ddpg_cql_guard.py |
| MB-TRPO | models/trpo.py |
| GMB-TRPO | models/trpo_guard.py |
| MB-CPO | models/cpo.py |
| GMB-CPO | models/cpo_guard.py |
Use the following script to perform offline rollout evaluation on the test dataset:
python eval.py├── data/ # Intermediate and final datasets
├── models/ # Offline RL implementations
├── notebooks/
│ ├── feat_selection.ipynb
│ ├── data_split.ipynb
│ └── transition_model.ipynb
├── sepsis_cohort_continous.py
├── guardian.py
├── eval.py
└── README.md # (this file)
Due to the usage restrictions of the MIMIC-III dataset, we are unable to provide any demonstration data or preprocessed files in this repository. Access to the MIMIC-III dataset must be obtained individually through PhysioNet after completing the required credentialing process.
For more information and to request access, please visit: https://physionet.org/content/mimiciii/1.4/