Comparative Analysis of XGBoost and Random Forest Algorithms for Early Detection of Chronic Kidney Disease
Chronic kidney disease (CKD) often progresses without symptoms, so many patients are diagnosed late. This study compared Random Forest (RF) and Extreme Gradient Boosting (XGBoost) for early CKD detection under a single leakage-controlled protocol. The UCI CKD dataset (400 patients, 24 attributes) was processed in a pipeline in which imputation, encoding and SMOTE oversampling were fitted only on training folds, and both models were tuned with nested stratified cross-validation. Accuracy, precision, recall, F1-score, AUC, Matthews correlation coefficient and training time were measured, and the models were compared with the Wilcoxon and McNemar tests. SHAP values were used to explain the predictions. XGBoost achieved a mean accuracy of 98.50%, an F1-score of 98.80% and an AUC of 0.998, compared with 97.25%, 97.81% and 0.994 for RF, and it trained about 2.3 times faster. However, the difference was not statistically significant (p = 0.109). Haemoglobin, specific gravity, serum creatinine and albumin were the most influential predictors, and a reduced five-attribute model retained an accuracy of 97.75%. Both ensembles were therefore suitable for low-cost CKD screening in primary health care.
Authors
- Siti Rahmawati
- Andi Pratama
Publication Details
- Journal
- Journal of Information Technology computer science and Electrical Engineering
- Published
- 2026-11-18
- DOI
- https://doi.org/10.61306/j0ke2t52
- Primary Topic
- Artificial Intelligence in Healthcare
- Type
- article
- Field-Weighted Citation Impact
- 0.00