Diabetes Disease Classification Using Tree-Based Machine Learning Algorithms: Random Forest, XGBoost, and LightGBM
Abstract
The number of people affected by diabetes continues to grow worldwide, making it a major public health concern because delayed diagnosis can lead to severe health complications. This study applies and compares three treebased machine learning classifiers, namely Random Forest (RF), Extreme Gradient Boosting (XGBoost), and Light Gradient Boosting Machine (LightGBM), for diabetes classification using the Behavioral Risk Factor Surveillance System (BRFSS) 2024 dataset. The dataset was preprocessed, balanced using Random Undersampling (RUS), and optimized through Grid Search cross-validation. The models were compared using accuracy, precision, recall, F1-score, Area Under the Curve (AUC), and computational time. The results show that RF achieved an accuracy of 95.01% and AUC of 97.20%, while XGBoost improved performance with 95.32% accuracy and 97.79% AUC. LightGBM emerged as the strongest performing model, reaching 95.42% accuracy, 96.23% precision, 85.46% recall, 89.82% F1-score, and 97.87% AUC. Feature importance analysis identified body mass index, age, weight, and alcohol-related variables as major predictors. Overall, LightGBM provided the best combination of predictive performance and computational efficiency, making it a promising approach for early diabetes risk prediction and prevention.