Skip to content

Conversation

@Razin93937
Copy link
Contributor

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 EmbeddingModel to accommodate these new processors. It also adds mask outputs for EmbeddingModel. Additionally, unit tests and an example notebook using MortalityPredictionMIMIC3 are included to validate and demonstrate the updated functionality.

Files to review

  • pyhealth\processors\__init__.py - Added imports for DeepNestedSequenceProcessor and DeepNestedFloatsProcessor
  • pyhealth\processors\deep_nested_sequence_processor.py - New file implementing processors for third-order nested categorical and numerical sequences
  • pyhealth\models\embedding.py - Refactored to support new processors, added mask output handling
  • pyhealth\models\adacare.py - Updated to PyHealth 2.0, integrated new processors, revised input handling
  • tests\core\test_adacare.py - New file with comprehensive unit tests for AdaCare model initialization, forward/backward passes, and output validation
  • examples\mortality_mimic3_adacare.ipynb - New example notebook demonstrating mortality prediction on MIMIC-III using the updated AdaCare model
  • examples\mortality_mimic3_adacare.py - Removed old example

Copy link
Contributor Author

@Razin93937 Razin93937 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to remove the @property decorator from the size() function of StageNetTensorProcessor (pyhealth\processors\stagenet_processor.py) to match the convention of other sequence processors.

@Razin93937 Razin93937 force-pushed the pyhealth2bounty/adacare branch from 068698d to 710ebae Compare November 16, 2025 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant