CKD Prediction Model
A k-nearest neighbours classifier that predicts whether a patient is likely to have or develop chronic kidney disease.
Chronic kidney disease affects over 780 million people. This project trains a classifier on patient records from the UCI chronic kidney disease dataset (blood tests, urine tests and other health measurements) to predict whether a new patient has, or is likely to develop, the disease.
Approach
- Cleaning. Columns with 15% or more missing values were dropped, and remaining gaps were filled with each column’s median. Categorical values were encoded as 0 and 1 and everything was scaled.
- Exploring. A pairwise plot showed haemoglobin, packed cell volume and serum creatinine as the strongest signals.
- Tuning. k was chosen with 10-fold cross-validation, plotting accuracy against k.
Results
The classifier was 98.7% accurate on the held-out test set. It made one mistake, labelling a patient with CKD as healthy, and had no false positives.