Skip to content

Ptxlb binary - #1664

Open
ml182-del wants to merge 12 commits into
sunlabuiuc:masterfrom
ml182-del:ptxlb_binary
Open

ml182-del wants to merge 12 commits into
sunlabuiuc:masterfrom
ml182-del:ptxlb_binary

Conversation

@ml182-del

Copy link
Copy Markdown

Contributor: ml182, xiaow8, lokesh

Contribution Type: New standalone Task

Original Paper: https://www.nature.com/articles/s41597-020-0495-6

PTB-XL dataset: https://physionet.org/content/ptb-xl/1.0.3/

Description: Introduce PTXLB Binary, a task based on the above research paper to determine if a specified SCP diagnostic code is present in the PTB-XL dataset.

Files to Review:

  • `pyhealth/tasks/ptbxl_binary.py - Main Task implementation
  • `tests/core/test_ptbxl_binary.py - Test cases
  • examples/ptbxl_ptbxl_binary_sparcnet.py - Abalation Study
  • docs/api/tasks.rst - Index
  • docs/api/tasks/pyhealth.tasks.ptbxl_binary.rst - Docs

@solarsys

Copy link
Copy Markdown
Collaborator

Why this PR has status: manual: overlap. Three open PRs add a PTB-XL binary classification task (#1598, #1614, #1664), and two add a TaskAug model (#1598, #1490). A maintainer has to pick one of each.

To help the maintainers decide, please comment here with what your PR does that the others don't, such as fidelity to the paper, results or test coverage. Whichever PR isn't picked can still contribute its unique parts on top of the chosen one. The decision is tracked in #1668.

Also, since this is your first PR here, CI waits for a maintainer to approve the run.

@solarsys

Copy link
Copy Markdown
Collaborator

We compared the four PTB-XL PRs and picked #1598's PTBXLBinaryClassification as the binary task. Your single-SCP-code target and your baseline-removal and standardization options are new, though, and we'd like them as an extension.

After #1598 merges, please add these to the merged task:

  • an SCP-code target, ideally with a min_likelihood threshold like PTBXLMultilabelClassification has;
  • optional baseline removal and per-record standardization;
  • tests in tests/core and a >>> docstring example.

Fixes needed either way:

  • The ablation never passes remove_baseline or standardize (it calls PTBXLBinary(target_class=...)), so its "no variation" finding comes from that.
  • task_name is misspelled PTLXLBinary.
  • The docs reference MyPTLXLBinary, which doesn't exist.

LBBB True None {'roc_auc': 1.0, 'pr_auc': 1.0, 'loss': 0.3714141845703125}
LBBB True record {'roc_auc': 0.7428571428571429, 'pr_auc': 0.8, 'loss': 1.0564333200454712}

Findings:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Findings:
With standardization disabled, every configuration reached a
perfect roc_auc and pr_auc, so neither the target class nor
baseline wander removal changed the outcome on its own.
The preprocessing effects only appeared once record level
standardization was applied, which removes the per lead
amplitude cue the synthetic classes rely on. Under
standardization alone, only LBBB degraded (1.00 to 0.54).
Adding baseline wander removal on top of standardization
lowered IMI (1.00 to 0.74) and LVH (1.00 to 0.92) but raised
LBBB (0.54 to 0.74), which suggests the two preprocessing
steps interact rather than acting independently. Loss values
varied with the target class and the preprocessing settings.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: manual Pending maintainer's review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants