PyHealth
PyHealth copied to clipboard
fix mortality prediction tasks not considering patients may have hete…
…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 ofpyhealth/tasks/mortality_prediction.py. The condition now uses addition (+) instead of multiplication (*) to check if any of theconditions,procedures_list, ordrugslists are empty. This ensures that visits with any missing data are excluded. [1] [2] [3] [4]
Test Configuration Updates:
- Changed the
devparameter in thetest_mortality_prediction_mimic3test inpyhealth/unittests/test_mortality_prediction.pyfromFalsetoTrueto enable development mode for the dataset. This likely facilitates faster testing with a smaller dataset.