Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/api/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ API Reference
models/pyhealth.models.BaseModel
models/pyhealth.models.NeuralFineGray
models/pyhealth.models.LogisticRegression
models/pyhealth.models.GA2M
models/pyhealth.models.MLP
models/pyhealth.models.CNN
models/pyhealth.models.UNet
Expand Down
31 changes: 31 additions & 0 deletions docs/api/models/pyhealth.models.GA2M.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
pyhealth.models.GA2M
=====================

Doctor-interpretable Generalized Additive Model with pairwise interactions
(GA2M), reproducing Hegselmann et al. (2020), "An evaluation of the
doctor-interpretability of generalized additive models with interactions"
(PMLR 126). Each additive 1D/2D term is a lookup table of learnable weights
over quantile bins, trained jointly by ordinary SGD through
:class:`~pyhealth.trainer.Trainer` -- unlike InterpretML's
``ExplainableBoostingClassifier``, which fits terms by cyclic gradient
boosting.

A dedicated reserved bin represents a missing feature value, so missing and
observed values never share a bin and no imputation or z-score
normalization is required upstream. ``get_shape_functions()`` exposes each
term's learned curve/surface, centered for interpretability, for visual
inspection by a clinician.

See ``examples/mimic3_mortality_ga2m.py`` for the full set of experiments
(bin-count ablation, the paper's two-phase pairwise-interaction
selection, and the clinician-pruning ablation) against
:class:`~pyhealth.tasks.InHospitalMortality48hMIMIC3`.

.. autoclass:: pyhealth.models.GA2M
:members:
:undoc-members:
:show-inheritance:

.. autofunction:: pyhealth.models.ga2m.rank_pairs_by_contribution_variance

.. autofunction:: pyhealth.models.ga2m.all_pairs
1 change: 1 addition & 0 deletions docs/api/tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ Available Tasks
Competing-Risk Preprocessing <tasks/pyhealth.tasks.competing_risks>
In-Hospital Mortality (MIMIC-IV) <tasks/pyhealth.tasks.InHospitalMortalityMIMIC4>
In-Hospital Mortality (MEDS) <tasks/pyhealth.tasks.InHospitalMortalityMEDS>
In-Hospital Mortality 48h (MIMIC-III) <tasks/pyhealth.tasks.InHospitalMortality48hMIMIC3>
DearLLM Mortality (MIMIC-III/IV) <tasks/pyhealth.tasks.dearllm_mortality>
ICU Admission (MEDS) <tasks/pyhealth.tasks.ICUAdmissionMEDS>
Hospital Readmission (MEDS) <tasks/pyhealth.tasks.HospitalReadmissionMEDS>
Expand Down
18 changes: 18 additions & 0 deletions docs/api/tasks/pyhealth.tasks.InHospitalMortality48hMIMIC3.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
pyhealth.tasks.InHospitalMortality48hMIMIC3
=============================================

48-hour in-hospital mortality on MIMIC-III, as 34 raw-unit summary
statistics (mean and standard deviation of 17 clinical variables),
reproducing the feature extraction of Hegselmann et al. (2020) (itself
adapted from the Harutyunyan et al. 2019 benchmark). Works with
:class:`~pyhealth.datasets.MIMIC3Dataset`.

Missing values are kept as an explicit sentinel (``-1.0``) rather than
imputed or z-scored, matching :class:`~pyhealth.models.GA2M`'s expectation
of a dedicated "missing" bin. See ``examples/mimic3_mortality_ga2m.py`` for
a full reproduction pipeline against that model.

.. autoclass:: pyhealth.tasks.in_hospital_mortality_48h_mimic3.InHospitalMortality48hMIMIC3
:members:
:undoc-members:
:show-inheritance:
Loading
Loading