GA2M Model for In-Hospital Mortality Prediction (Hegselmann et al., MLHC 2020)#1124
Open
smritiSrinivasan109 wants to merge 6 commits intosunlabuiuc:masterfrom
Open
GA2M Model for In-Hospital Mortality Prediction (Hegselmann et al., MLHC 2020)#1124smritiSrinivasan109 wants to merge 6 commits intosunlabuiuc:masterfrom
smritiSrinivasan109 wants to merge 6 commits intosunlabuiuc:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Contributors:
Type of contribution: Model (Option 2)
Original paper: Hegselmann, Stefan et al. "An Evaluation of the Doctor-Interpretability of Generalized Additive Models with Interactions." Machine Learning in Health Care (2020). https://proceedings.mlr.press/v126/hegselmann20a/hegselmann20a.pdf
Description:
Implements a PyTorch-native GA2M (Generalized Additive Model with Interactions) for in-hospital mortality prediction using MIMIC-IV ICU data. The model uses learned per-bin risk embeddings over feature bins, representationally equivalent to the original gradient-boosted shape functions from the paper, though optimised via SGD for compatibility with PyHealth's trainer. Training follows the paper's two-stage process: main effects first, then top-K interaction pairs selected by variance of learned risk scores. The original paper uses gradient-boosted trees via the mltk toolkit; this implementation uses SGD over embeddings which is architecturally the same but optimised differently.
File Guide:
pyhealth/models/ga2m.pypyhealth/datasets/mimic4_icu_mortality.pyexamples/mimic4_mortality_ga2m.pytests/test_ga2m.pydocs/api/models/pyhealth.models.GA2M.rstEnvironment:
pip install -e .from the repo root, thenpip install pytest scikit-learn.To run:
python examples/mimic4_mortality_ga2m.py \ --data_root path/to/mimic-iv-demo/mimic-iv-clinical-database-demo-2.2--n_bins--top_k--epochs--lrTo run tests: