Skip to content

Final project submission: temporal MIMIC3 pipeline#994

Open
elizabethbinkina wants to merge 1 commit intosunlabuiuc:masterfrom
elizabethbinkina:liz-temporal-mimic3
Open

Final project submission: temporal MIMIC3 pipeline#994
elizabethbinkina wants to merge 1 commit intosunlabuiuc:masterfrom
elizabethbinkina:liz-temporal-mimic3

Conversation

@elizabethbinkina
Copy link
Copy Markdown

Name: Elizabeth Binkina
NetID: binkina2

Type of Contribution:
Full pipeline (Dataset + Task + Model)

Paper:
https://proceedings.mlr.press/v106/nestor19a.html

Description:
This PR introduces a temporal extension of the MIMIC-III dataset, along with a hospital mortality prediction task and a neural network model that incorporates temporal features.

The goal of this contribution is to enable modeling of temporal trends in patient data by incorporating admission year as a feature and supporting temporally consistent dataset splits.

Key features:

  • Temporal normalization of admission year (scaled between 0 and 1)
  • Temporal train/validation/test splits based on admission year
  • Integration of temporal features into downstream prediction tasks
  • Lightweight neural model (TemporalFusionMLP) for combining temporal and clinical features

Files Added/Modified:

  • pyhealth/datasets/mimic3_temporal.py
  • pyhealth/datasets/configs/mimic3_temporal.yaml
  • pyhealth/tasks/temporal_hospital_mortality_prediction.py
  • pyhealth/models/temporal_fusion_mlp.py
  • examples/mimic3_temporal_hospital_mortality_temporalfusionmlp.py
  • tests/core/test_mimic3_temporal.py
  • tests/core/test_temporal_fusion_mlp.py
  • tests/core/test_temporal_hospital_mortality_prediction.py
  • docs/api/datasets/pyhealth.datasets.mimic3_temporal.rst
  • docs/api/models/pyhealth.models.temporal_fusion_mlp.rst
  • docs/api/tasks/pyhealth.tasks.temporal_hospital_mortality_prediction.rst

Example Usage:
Run the following script to reproduce results:

python examples/mimic3_temporal_hospital_mortality_temporalfusionmlp.py

This script demonstrates:

  • Random vs temporal dataset splits
  • Model performance with and without temporal features

Testing:
Unit tests are included for:

  • Dataset utilities (normalization and temporal splitting)
  • Task sample generation and modality requirements
  • Model instantiation, forward pass, and gradient computation

All tests use synthetic data and run quickly.

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.

2 participants