[Bounty] Adacare PyHealth 2.0 #613
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contributor: Sayeed Sajjad Razin (razin93937@gmail.com)
Contribution Type: Update to Models, Processors, Tests, Example
Description
This PR updates the AdaCare model to PyHealth 2.0. It introduces deep nested sequence processors and refactors the
EmbeddingModelto accommodate these new processors. It also adds mask outputs forEmbeddingModel. Additionally, unit tests and an example notebook usingMortalityPredictionMIMIC3are included to validate and demonstrate the updated functionality.Files to review
pyhealth\processors\__init__.py- Added imports for DeepNestedSequenceProcessor and DeepNestedFloatsProcessorpyhealth\processors\deep_nested_sequence_processor.py- New file implementing processors for third-order nested categorical and numerical sequencespyhealth\models\embedding.py- Refactored to support new processors, added mask output handlingpyhealth\models\adacare.py- Updated to PyHealth 2.0, integrated new processors, revised input handlingtests\core\test_adacare.py- New file with comprehensive unit tests for AdaCare model initialization, forward/backward passes, and output validationexamples\mortality_mimic3_adacare.ipynb- New example notebook demonstrating mortality prediction on MIMIC-III using the updated AdaCare modelexamples\mortality_mimic3_adacare.py- Removed old example