som-shahlab / ehr_ml

Code for doing machine learning with various EHRs
MIT License
21 stars 3 forks source link

Allow users to specify train/val split using patient_id and date #28

Closed guolin1 closed 2 years ago

guolin1 commented 2 years ago

Currently the train/val split specification requires a training end date and a validation end date, and the validation end date is required to be later than the training end date. This restricts the OOD model selection to being time-based. It would be great to allow train/val split specification using a similar method as how the excluded patient list is specified, e.g., using patient_id and a date in the patient timeline as end date for that patient. This would allow more flexible train/val split for, e.g., time-based IID model selection.

EthanSteinberg commented 2 years ago

This is now resolved with a lot more options added to model setup.