-
Notifications
You must be signed in to change notification settings - Fork 555
[PyHealth2.0 Bounty] MIMIC3 Readmission Prediction #751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PyHealth2.0 Bounty] MIMIC3 Readmission Prediction #751
Conversation
…mimic3-readmission-prediction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only change to this file was to change the admission and discharge times for subject_id 10088's first admission such that the admission was less than 18 years after the subject's date of birth.
jhnwu3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! Thanks a lot!
Overview
This PR updates the
readmission_prediction_mimic3_fnfor PyHealth 2.0. I'll complete the readmission prediction tasks for the other datasets once this PR merges. This early PR should make that next PR go more smoothly.In addition to supporting PyHealth 2.0, the new
ReadmissionPredictionMIMIC3task has the following improvements. First, it takes adatetime.timedeltainstead of anintfor the readmission window, making the input parameter clearer and more flexible. Second, it can optionally exclude visits where the patient was under 18 years old (a previously unimplemented#todo).Besides the items listed above,
ReadmissionPredictionMIMIC3should be logically equivalent toreadmission_prediction_mimic3_fn.Testing
I added unit tests for
ReadmissionPredictionMIMIC3and updated and ranexamples/readmission_mimic3_rnn.py.I also updated
examples/readmission_mimic3_fairness.py, but it doesn't run asfairness_metrics_fnwas disabled in #320.Additional Notes
Apologies for all the whitespace changes in
README.rst. My editor automatically removes trailing whitespace and I had to update a code snippet in that file. Let me know if you'd rather not merge the whitespace changes and I can undo them.I considered keeping
readmission_prediction_mimic3_fnas a wrapper aroundReadmissionPredictionMIMIC3for backwards compatibility (I saw #735 does this for the LoS tasks). However, I'm not sure the changes to the LoS tasks are actually backwards compatible. The new tasks return lists for conditions, procedures, and drugs. The old tasks used to return lists of lists for these items but now as pass throughs they just return lists. I'm not sure if that change in behavior would impact users of the old tasks.