Q&A-2Design and defend a biological ML workflow for prediction target.
Answer
Clarify, then answer. A "prediction target" in biological ML is five decisions glued together - who, when, what outcome, over what horizon, driving which action - and any one left implicit silently changes the question. I'll fix a concrete one and defend it.
Assumptions: adult ICU, EHR-derived data, and the clinical job is to trigger a nephrology review before injury deepens. Prediction unit: one ICU stay, scored hourly. Target: P(KDIGO stage 2+ acute kidney injury within the next 48 h), using only data timestamped at or before the scoring hour. Time zero: ICU admission. Outcome: KDIGO stage 2+ - creatinine at or above 2.0x baseline, or creatinine at or above 4.0 mg/dL, or urine output below 0.5 mL/kg/h for 12 h or more. Baseline: lowest creatinine in the 7 days before ICU admission. Action: a positive prompts a nurse to re-check creatinine and fluid balance within 4 h. The model orders nothing.
| element | decision | defended because |
|---|---|---|
| unit | ICU stay-hour | matches the hourly floor decision |
| population | age 18+, no chronic dialysis, first ICU stay | dialysis patients cannot express the creatinine endpoint |
| time zero | ICU admission | unambiguous and charted |
| outcome | KDIGO stage 2+ | reproducible from two routine streams, creatinine and urine output |
| horizon | 48 h | enough lead time for a fluid and medication review |
| action | re-check within 4 h | no action, no reason to build it |
Alternatives I rejected: a 12 h horizon buys too little time to act; 7 days lets labels absorb unrelated physiology; admission-only static scoring misses the trajectory; and stage 1 as the endpoint is mostly transient, largely reversible creatinine bumps that would flood the same alerting capacity with lower-acuity events.
Worked trace of the label. Baseline 0.9 mg/dL. Creatinine at t=0 is 1.1 (ratio 1.22 - no); t=12 is 1.4 (1.56 - stage 1); t=30 is 1.9 (2.11 - stage 2, event). Event time 30 h sits inside the 48 h window, so the stay is positive. The same patient discharged at t=10 h with no further creatinine gives an unknown label, not a negative one - that is censoring, not a negative example.
Why the numbers force the design. At a 4% event rate across 12,000 ICU stays, sensitivity 0.75 and specificity 0.80 gives TP = 360, FP = 2304, precision = 360/2664 = 13.5%. Roughly seven of eight alerts are false. That is the price of a 48 h horizon; shortening the horizon raises prevalence and precision but buys less time to act, which is exactly the trade you make when you set the target.
Failure modes and how each is detected.
- Post-outcome features: a creatinine drawn at t=35 h because the clinician already suspected AKI leaks into the t=24 h feature vector. Assert max(feature timestamp) <= scoring time on every row; leakage shows as AUROC dropping more than 0.1 once that assert is on.
- Proxy label: billing ICD codes for AKI assigned at discharge instead of KDIGO labs. Cross-tab the code against the KDIGO label and read the kappa; a low kappa means you trained on a different target.
- Ambiguous time zero: ICU admission versus hospital admission shifts the whole window by hours. Pin one and log it per row.
- Target mismatch: training on "AKI at any point" while deploying as a 48 h warning. Label horizon and deployment horizon must be identical.
- Selection bias: MIMIC-IV is one US academic centre, and stays with no creatinine measurement get dropped, which is informative missingness. Re-validate on eICU-CRD.
- Out of scope: paediatrics, chronic dialysis, and ward patients. Name them and refuse to score them.
Validation: train on 2008-2016, test on 2017-2019 as a temporal split, and report precision at a fixed recall rather than AUROC alone.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.