Skip to content

Additional outcomes#5

Merged
mlondschien merged 20 commits intomainfrom
additional-outcomes
Apr 3, 2025
Merged

Additional outcomes#5
mlondschien merged 20 commits intomainfrom
additional-outcomes

Conversation

@mlondschien
Copy link
Copy Markdown
Member

No description provided.

@mlondschien mlondschien requested a review from Copilot March 27, 2025 15:42
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces additional outcome labels and refactors feature engineering logic for ICU data analysis.

  • Adds a new optional parameter switches_only to the eep_label function with corresponding documentation and branch logic.
  • Implements new outcome labels for respiratory failure (hueser variant), circulatory failure (hyland variant), kidney failure (Lyu variant), and additional labels for hyperglycemia, hypoglycemia, severe MELD, SOFA, and sepsis.
  • Adds a feature check in main() that verifies required features are present based on the external features loader.

Comment thread icu_features/feature_engineering.py Outdated
Comment thread icu_features/feature_engineering.py
@mlondschien mlondschien force-pushed the additional-outcomes branch from fe5389f to 15de3e1 Compare March 27, 2025 16:15
Comment thread icu_features/feature_engineering.py Outdated
Comment thread icu_features/feature_engineering.py Outdated
Comment thread icu_features/feature_engineering.py Outdated
Comment thread icu_features/feature_engineering.py
Comment thread icu_features/feature_engineering.py Outdated
Comment thread icu_features/feature_engineering.py Outdated
Comment on lines +681 to +682
sofa3 = pl.col("bili").forward_fill(1).backward_fill(1) > 6.0
sofa3_at_48h = eep_label(sofa3, 48).alias("sofa3_at_48h")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sofa3 = pl.col("bili").forward_fill(1).backward_fill(1) > 6.0
sofa3_at_48h = eep_label(sofa3, 48).alias("sofa3_at_48h")
liver_sofa3 = pl.col("bili").forward_fill(1).backward_fill(1) > 6.0
liver_sofa3_at_48h = eep_label(liver_sofa3, 48).alias("liver_sofa3_at_48h")

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switches_only=True/False?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in principle also switches_only=False. I haven't used this task so far, we could also drop it. The MELD variant is more robust and worked out fine, this was a backup when I added "liver support".

Comment thread icu_features/feature_engineering.py Outdated
Comment thread icu_features/feature_engineering.py Outdated
Comment thread icu_features/feature_engineering.py
Comment thread tests/test_outcomes.py
@mlondschien mlondschien requested a review from manuelburger April 3, 2025 07:41
@mlondschien mlondschien merged commit 6bae0d3 into main Apr 3, 2025
2 checks passed
@mlondschien mlondschien deleted the additional-outcomes branch April 3, 2025 10:00
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.

3 participants