Gradient-boosted models such as XGBoost don't learn a single formula — they learn an ensemble of shallow decision trees, each one correcting the errors of the trees before it. Every patient's record is pushed through all the trees, their small votes are summed, and the total is squeezed through a sigmoid curve to give a probability between 0% and 100%.
This simulation uses a simplified, teaching-only version of that idea — a smooth logistic surface standing in for the boosted ensemble — so you can see how the shape of the risk landscape shifts as clinical inputs change. It is not a diagnostic tool.
Real clinical stroke-risk models trained on UK datasets typically combine dozens of features — age, blood pressure, glucose, BMI, smoking status, atrial fibrillation and more — and are validated against calibration curves before any NHS-style screening tool would use their output to flag a patient for review.
A 3D risk landscape built from a simplified gradient-boosted model, showing how age, glucose, blood pressure and lifestyle factors combine into a single stroke-risk score, the same way an XGBoost-style clinical model reasons.
The terrain's height at any age/glucose combination is the model's predicted risk; the contribution bars break that single number back down into what each feature contributed, and the tree ensemble shows how many "votes" pushed toward elevated risk.
Move the age, glucose and systolic BP sliders and toggle smoking or hypertension. Watch the patient marker climb or descend the risk landscape, the bars swing red or blue, and the dial's needle sweep live.
Boosted-tree models are popular for tabular clinical data precisely because they capture this kind of non-linear, interacting risk surface without needing hand-engineered feature crosses.