PyHealth icon indicating copy to clipboard operation
PyHealth copied to clipboard

fix mortality prediction tasks not considering patients may have hete…

Open jhnwu3 opened this issue 8 months ago • 0 comments

…rogeneous profiles This pull request updates the logic in the MortalityPrediction task to improve how visits with insufficient clinical data are excluded and modifies a test configuration for the MortalityPredictionMIMIC3 task. The most important changes are grouped into logic updates and test configuration updates.

Logic Updates:

  • Updated the condition for excluding visits without sufficient clinical data in the __call__ method of pyhealth/tasks/mortality_prediction.py. The condition now uses addition (+) instead of multiplication (*) to check if any of the conditions, procedures_list, or drugs lists are empty. This ensures that visits with any missing data are excluded. [1] [2] [3] [4]

Test Configuration Updates:

  • Changed the dev parameter in the test_mortality_prediction_mimic3 test in pyhealth/unittests/test_mortality_prediction.py from False to True to enable development mode for the dataset. This likely facilitates faster testing with a smaller dataset.

jhnwu3 avatar May 04 '25 22:05 jhnwu3