Repository navigation
[CS598 DL4H] TPC model for MIMIC-IV in-hospital mortalityTpc mortality prediction - #1724
Open
avnimohan9 wants to merge 10 commits into
Open
avnimohan9 wants to merge 10 commits into
avnimohan9 wants to merge 10 commits into
Conversation
Placeholders for the model, docs page, example script and tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copied as-is from fork/master (62a84e3). Example renamed to .py and docs page put in the existing pyhealth.models.TPC.rst to match the upstream naming. Co-Authored-By: PawelUIUC <PawelUIUC@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use the redundant alias in __init__, add >>> examples to MaskedNorm1d and TPCLayer, and wrap lines over 88 characters. No logic changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PyHealth moved output size, loss and activation onto the label processor, so TPC now calls label_processor.output_size(), .loss() and .activation(). Also restores the trailing blank line in models.rst. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Save/load uses a temp folder and checks it is cleaned up. Also tests the embed output, TPCLayer output size and causality, and MaskedNorm1d in eval mode and on an all-padding batch. 14 tests, all pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Headers with names, NetIDs, paper and description in the model, example and test files; drop leftover PURPOSE/STATUS notes; type the example's functions and add -> None to __init__ methods. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a placeholder for results summary.
This document details hyperparameter ablation and baseline comparison for the Temporal Pointwise Convolutional model on MIMIC-IV in-hospital mortality data, including experimental setup, results, findings, and caveats.
Updated section title from 'Caveats' to 'Considerations' for clarity.
Point the example's RESULTS section at the results file with a summary table, set the default to the 15 epochs used, note that test scores use the best-validation checkpoint, mark the 5-epoch remark as not tabulated, and replace links to CSVs that are not in the repo with run commands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
|
Why this PR has What you can contribute instead: rebase on master and use the merged |
This branch has not been deployed
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.
Title: [CS598 DL4H] TPC model for MIMIC-IV in-hospital mortality
Contributors
Contribution type
Model contribution: Temporal Pointwise Convolutional Network (TPC).
Paper
Rocheteau, Liò & Hyland, "Temporal Pointwise Convolutional Networks for Length of Stay Prediction in the Intensive Care Unit", CHIL 2021. https://arxiv.org/abs/2007.09483
What it does
TPC reads hourly lab time series (
timeseriesinput,[batch, hours, labs]) and predicts a binary label, here in-hospital mortality withInHospitalMortalityMIMIC4. Each TPC layer runs two branches side by side and concatenates them with skip connections:Padded hours are masked: a padding-aware batch norm (
MaskedNorm1d) skips them, and the prediction comes from each patient's last real hour. Options cover the paper's ablations:use_temporal,use_pointwise,use_skips,share_weights, and linear or exponential dilation.Files
pyhealth/models/tpc.py:MaskedNorm1d,TPCLayer,TPCpyhealth/models/__init__.py: exportdocs/api/models/pyhealth.models.TPC.rst+docs/api/models.rstindex entryexamples/mimic4_mortality_tpc.py: baseline comparison and hyperparameter sweepexamples/mimic4_mortality_tpc_results.md: results write-uptests/core/test_tpc.py: 14 unit testsTests
14 fast tests on synthetic data (slowest about 0.1 s). They cover:
tools/check_pr_rules.pypasses.Results (full MIMIC-IV v2.2, 224,791 admissions, 15 epochs, mean of 3 seeds)
TPC beat every baseline in all 3 seeds with 60,863 parameters, against 135k–268k for the baselines. In the one-at-a-time sweep:
temp_channelsandpoint_sizechanged AUROC by 0.003 or less.The full write-up is in
examples/mimic4_mortality_tpc_results.md.Note
#1412 recently added a TPC model for length-of-stay prediction as
pyhealth/models/tpc.py, so this branch currently conflicts withmasteron the same file and class names. We are happy to rename this implementation (for exampleTPCMortalityintpc_mortality.py) or fold it into the existing module, whichever the maintainers prefer.