Code and aggregate checks for the SAFE-CAP manuscript.
This repository includes paper policy artifacts, aggregate result tables, and Python code for the main cohort, trajectory, policy, off-policy evaluation, and secondary-analysis steps. MIMIC-IV and eICU are available through PhysioNet and are not redistributed here.
safe_cap_rl/: code for cohorts, 12-hour trajectories, policy handling, off-policy evaluation, and secondary analyses.scripts/01_build_cohorts.pytoscripts/09_make_tables.py: ordered command line stages; seescripts/README.md.artifacts/policy/: paper policy artifacts and seed-selection table.artifacts/expected_results/: manuscript result tables and numeric checks.artifacts/README.md: notes on included artifacts and generated outputs.
Raw clinical data, row-level derived tables, split identifiers, notebooks, and development notes are not included.
python -m venv .venv
. .venv/bin/activate
pip install -r requirements.txtpython -m safe_cap_rl.verify_policy --repo-root . --output-dir artifacts/generated/policy
python -m safe_cap_rl.verify_results --output-dir artifacts/generated/results
python -m safe_cap_rl.evaluate --repo-root . --output-dir artifacts/generated
sha256sum -c RELEASE_MANIFEST.sha256The included tables reproduce the manuscript numbers from the paper policy
artifacts and aggregate result tables. Users with approved PhysioNet access can
run the numbered stages against local MIMIC-IV and eICU extracts; see
scripts/README.md.
Optional package tests are in tests/.
Apache License 2.0.