← 🧠 Machine Learning

🩺 SHAP Waterfall

Pushes risk up Pushes risk down
Hover or tap a bar for details
Baseline risk:
Final predicted risk:
Top driver:
FPS:
Drag — rotate · Scroll — zoom · Click a bar — inspect feature

🩺 Why Doctors Won't Trust a Black Box: SHAP and Explainable AI

A UK stroke-risk model's prediction is decomposed into a 3D SHAP waterfall: a baseline population risk, followed by stacked bars showing exactly how much each clinical feature pushed the score up or down to reach the final prediction.

🔬 What It Demonstrates

SHAP values split a single opaque risk score into additive, per-feature contributions rooted in Shapley game theory. Red bars raise predicted risk above the population baseline; purple bars lower it — and they always sum exactly to the final prediction.

🎮 How to Use

Pick a preset patient or drag the age, blood pressure, glucose and BMI sliders yourself, toggle smoking status, and watch every bar resize and recolour live. Click any bar to read its exact contribution.

💡 Did You Know?

Because SHAP values are additive and consistent, a clinician can check whether a model's reasoning matches known medicine — e.g. that hypertension should raise risk — before ever trusting its number.