EXQUAIRO EXECUTIVE FOUNDATION · FOR UNIVERSITY MEDICAL CENTRES LEADERS
Heart Failure Case
Work through a focused machine-learning case using data from roughly 900 cardiology patients. The analysis runs on your own device, so you can examine how analytical choices and domain knowledge shape the result.
Twelve steps, about ninety minutes. Nothing to install. Choose how close to the machinery you want to sit — and switch at any moment.
What you will do
- 1
Framing
Start by checking what kind of prediction this file can support: one row per patient, a set of measurements, and a recorded diagnosis.
- 2
Data inspection
Look across the file before modelling: what variables are present, what ranges do they take, and which quality risks are already visible?
- 3
Exploration + correlation
Explore what separates patients with heart disease from patients without it, then check how the measurements relate to each other.
- 4
Prepare the model data
The central preparation decision in this case is how to handle cholesterol values recorded as zero before making the train/test split useful.
- 5
Decision tree
A decision tree learns a flowchart of yes/no questions from the training patients, then applies it to held-back patients.
- 6
Random forest
A random forest averages many trees, each trained on a slightly different slice of the data.
- 7
Boosting: XGBoost and LightGBM
Boosting builds trees sequentially, with each new tree focusing on mistakes left by the previous ones.
- 8
Explain an individual prediction
A local explanation shows how one patient's values pushed the model above or below its average prediction.
- 9
Robustness
Robustness testing checks whether performance holds when the data is split in several different ways.
- 10
Roles and next steps
You have now followed the whole cycle: data, quality, exploration, preparation, models, explanation and validation.
