Proof of Concept / Gradient Boosting Classification
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.
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...
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.
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.
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.