Explainable Machine Learning for Early Chronic Kidney Disease Prediction Using SHAP-Guided Feature Selection
DOI:
https://doi.org/10.66021/Keywords:
Chronic Kidney Disease, Explainable AI, SHAP, Feature Selection, Machine Learning, Random Forest, XG Boost, Clinical Decision SupportAbstract
Chronic kidney disease (CKD) is a progressive and often asymptomatic condition whose early detection is critical for preventing irreversible renal failure. Machine learning offers accurate automated screening, but the black-box nature of many models limits clinical trust and adoption. This paper presents an explainable machine learning framework for early CKD prediction that combines high predictive accuracy with transparent, clinically interpretable explanations. Four classifiers, namely Logistic Regression, Random Forest, XGBoost, and LightGBM, are trained and evaluated on the UCI Chronic Kidney Disease dataset of 399 patient records described by 24 clinical attributes. SHapley Additive exPlanations (SHAP) are then applied to quantify each feature's contribution to model predictions, both globally across the cohort and locally for individual patients. A SHAP-guided feature selection procedure is proposed that ranks features by mean absolute SHAP value and retrains the models on a compact subset. The Random Forest classifier achieves 100 percent test accuracy with a perfect area under the curve of 1.000, while all four models exceed 98 percent accuracy under five-fold cross-validation. The SHAP analysis identifies haemoglobin, specific gravity, packed cell volume, and serum creatinine as the most influential predictors, in agreement with established clinical knowledge. Using only the top eight SHAP-ranked features, all models reach 100 percent accuracy, reducing the feature count by 67 percent without any loss of performance.