An end-to-end ML pipeline and interactive web app that predicts common bile duct (CBD) stone probability from routine clinical inputs and recommends the most cost-effective next procedural step, outperforming the ASGE 2019 guidelines on unnecessary ERCP assignment.
A clinician enters a patient's labs and imaging findings. The app outputs:
- CBD stone probability (GBM model, KNN-imputed, trained on multi-site data)
- Recommended next step: MRCP, EUS, ERCP, or CCY + IOC
- Expected cost per pathway, given the predicted probability
Patients with cholangitis are flagged immediately per ASGE protocol. All other recommendations adapt to the predicted risk.
| Metric | Value |
|---|---|
| Accuracy | 86% |
| Precision | 85% |
| AUC | 95% |
Head-to-head vs. ASGE 2019 guidelines (test set, n = 469):
- Unnecessary ERCP assignments: 2.5% vs. 13.8% (ASGE)
- Missed CBD stones (sent to CCY + IOC): 1%
- Model:
GradientBoostingClassifier(scikit-learn),IterativeImputerfor missing labs - App: Python Dash with reactive callbacks — no page reloads, conditional UI (e.g., imaging toggles gate dependent fields)
- Data: 4 hospital cohorts merged across JHU, MGH, and two external validation sets
- Features (11): Age, Sex, AST, ALT, ALP, Total Bilirubin, CBD dilation on US, stone on US/CT, cholangitis, pancreatitis
The ASGE 2019 guidelines use a three-tier risk stratification (low / intermediate / high) to assign patients to watchful waiting, MRCP/EUS, or direct ERCP. The rule-based thresholds are conservative: they over-assign intermediate-risk patients to ERCP to avoid missing stones. This model replaces those thresholds with a continuous probability estimate, enabling tighter routing and lower procedural burden.