← Back to Index

Proof of Concept / Gradient Boosting Classification

Patient Switching
Predictor

XGBoost-Style Classification for CML TKI Therapy Switching

A gradient boosting classifier trained on synthetic CML patient data to predict which patients will switch tyrosine kinase inhibitor therapy within 6 months. The model learns non-linear interactions between clinical response markers (BCR-ABL1), tolerability signals, and market access barriers — then decomposes each prediction via SHAP-style feature contribution analysis. Built entirely in-browser with no backend dependencies.

Gradient BoostingBinary ClassificationSHAP WaterfallROC AnalysisFeature ImportanceCML Therapeutics

Disclaimer: This is a proof-of-concept demonstration using synthetic patient data. All clinical features, switching rates, and predictions are illustrative and do not represent actual patient populations or real-world treatment outcomes. This tool is NOT intended for clinical decision-making, patient care, or commercial strategy execution.

Generating synthetic CML patients & training classifier...

Technical Architecture

Gradient Boosting Classifier

Binary classification via iterative decision stump fitting on pseudo-residuals of the logistic loss function. Base value initialized at log-odds of the population switch rate. Each iteration computes gradients (y - p), fits an MSE-minimizing stump, and updates predictions in log-odds space with a 0.1 learning rate.

SHAP-Style Decomposition

Feature contributions extracted by summing each stump's left/right value contribution grouped by feature index. This provides an additive decomposition: base value + sum(contributions) = final log-odds prediction. Sorted by absolute contribution for interpretable waterfall visualization.

ROC & Threshold Optimization

Receiver Operating Characteristic curve computed by sweeping decision thresholds from 0 to 1. AUC calculated via trapezoidal integration. Optimal classification threshold selected by maximizing Youden's J statistic (sensitivity + specificity - 1), balancing false positives and false negatives.

References

  • Friedman JH. Greedy function approximation: a gradient boosting machine. Annals of Statistics. 2001;29(5):1189-1232.
  • Chen T, Guestrin C. XGBoost: A Scalable Tree Boosting System. Proc. KDD. 2016:785-794.
  • Lundberg SM, Lee SI. A Unified Approach to Interpreting Model Predictions. Proc. NeurIPS. 2017;30:4765-4774.
  • Hochhaus A, et al. European LeukemiaNet 2020 recommendations for treating chronic myeloid leukemia. Leukemia. 2020;34(4):966-984.
  • Cortes JE, et al. Asciminib in newly diagnosed chronic myeloid leukemia (ASC4FIRST). N Engl J Med. 2024;391(10):885-898.
  • Youden WJ. Index for rating diagnostic tests. Cancer. 1950;3(1):32-35.

Daniel Tran, PharmD

UC San Diego — Skaggs School of Pharmacy

Source code MIT. Content © 2026 Daniel Tran (CC BY-NC-SA 4.0).