PyHealth icon indicating copy to clipboard operation
PyHealth copied to clipboard

[Bounty] Deepr PyHealth 2.0 ver.

Open joshuasteier opened this issue 1 month ago • 1 comments

Contributor Information

  • Name: Joshua Steier
  • Contribution Type: Model

Description

Updated the Deepr model to align with PyHealth 2.0 conventions:

  • Migrated from BaseEHRDataset to SampleDataset
  • Replaced manual tokenization with EmbeddingModel
  • Updated label handling to use get_output_size() and direct tensor access
  • Added learnable gap embedding for nested sequence flattening
  • Supports both 3D and 4D input tensors

Files to Review

  • pyhealth/models/deepr.py
  • tests/core/test_deepr.py

Testing

python -m pytest -q tests/core/test_deepr.py -s
# Result: 5 passed

joshuasteier avatar Dec 04 '25 01:12 joshuasteier

Could you also provide a example notebook in the examples folder to demonstrate how to use this model? thank you.

Logiquo avatar Dec 06 '25 13:12 Logiquo

@jhnwu3, @LogicFan, I added an example notebook in addition to the changes above, thank you.

joshuasteier avatar Dec 18 '25 17:12 joshuasteier