Limitations¶
Important
ehr2rl is research infrastructure. It is not clinical decision support, does
not validate treatment recommendations, and does not define clinically valid
rewards. Policies trained on its datasets must not be used to guide patient
care. Responsibility for study design, reward choice, and interpretation rests
with the researcher.
Data access¶
ehr2rldoes not ship, mirror, or provide access to MIMIC-IV. Obtain data only through credentialed channels such as PhysioNet, and follow the data use agreement, including its rules on sharing derived data.Cached query results in
cache_dirare MIMIC-IV data. Store and delete them under the same rules as the source data, and keep them out of version control.
BigQuery workflow¶
Cost.
maximum_bytes_billedcaps each query separately. One load runs up to six queries, so its worst-case cost is six times the cap.Cohort selection. The cohort is the first N ICU stays by identifier, not a random or representative sample.
Admissions, not stays. Trajectories are per hospital admission; several ICU stays in one admission are merged.
Irregular timesteps. States use each distinct chart time. The preset’s
aggregationsetting is not applied.Units. Features are not unit-converted.
temperature_fandtemperature_care separate columns, and an itemid map’sconversionfield is informational only.Missing values. Gaps are forward-filled, and values before a feature’s first measurement are
0.0, which is not clinically meaningful.Outcomes. Only in-hospital mortality is extracted. SOFA scores and readmission outcomes must be computed separately.
Fluids. Only two fluid itemids (NaCl 0.9% and Dextrose 5%) count toward fluid actions.
Errors.
BigQueryAuthErroris raised for every query failure, not only authentication problems.Only MIMIC-IV v3.1 is supported.
Actions and policy¶
Norepinephrine-equivalent factors follow a common research convention and are not a clinical standard. Vasopressor rows with unrecognized rate units stop the load.
BehaviorPolicymodels only the first action column unless you combine columns yourself, and its propensities for the training data are in-sample.
Rewards¶
ReadmissionRewardusesNaNfor censored follow-up by default, and itswindow_daysargument is not used.The
policyargument ofshape()is ignored by every built-in reward.
Local CSV path¶
The local CSV path is frozen at its v0.1 behavior: raw itemid features, labs not resampled, and placeholder all-zero actions. It receives no itemid maps, presets, or validation.
Synthetic data¶
Synthetic trajectories have plausible value ranges but no clinical structure: actions follow a fixed rule, and mortality is random. Use them to develop and test code, never to draw conclusions.
Dependencies and stability¶
ehr2rlis alpha software. Public APIs may change between minor versions; check the changelog when upgrading.d3rlpymay print deprecation warnings from its own dependencies, such as a notice thatgymis unmaintained. These come fromd3rlpy, notehr2rl.