Analysis of Diabetes Prediction Models Based on XGBoost and LightGBM
DOI:
https://doi.org/10.61173/bzjqa936Keywords:
XGBoost, LightGBM, diabetes predictionsAbstract
Predicting diabetes more effectively and accurately is becoming more and more important, and this research helps find the best method to predict diabetes. With the development of the economy, the incidence of diabetes is gradually increasing. Research on comparing eXtreme Gradient Boosting (XGBoost) and Light Gradient Boosting Machine (LightGBM) in diabetes predictions and further comparing improved results remains limited. This study compares XGBoost and LightGBM’s performances in diabetes predictions, and gives suggestions on the best algorithm to predict diabetes mellitus. By using a dataset collected from Kaggle, this research uses XGBoost and LightGBM to create prediction models and compares the results to find out which performs better in diabetes predictions. Furthermore, this research optimizes the data used in building models and again compares the second results to excavate deeper information. The test set’s accuracy of XGBoost is 97.2% and the test set’s precision of XGBoost is 97.2% using the whole data, while the test set’s accuracy of LightGBM is 97.3% and the test set’s precision of LightGBM is 97.3%. The test set’s accuracy of XGBoost is 97.3% and the test set’s precision of XGBoost is 97.4% using the optimized data, while the test set’s accuracy of LightGBM is 94.9% and the test set’s precision of LightGBM is 94.8%. In conclusion, LightGBM has slight advantages compared to XGBoost using the whole data, and on the other hand, XGBoost performs better using the optimized data. Because the two algorithms have different advantages, the selection of the algorithms in diabetes predictions needs to depend on specific circumstances.
References
[1] Genuth SM, Palmer JP, Nathan DM. Classification and Diagnosis of Diabetes. In: Diabetes in America. 3rd ed. National Institute of Diabetes and Digestive and Kidney Diseases (US), Bethesda (MD); 2018. PMID: 33651569.
[2] Li T., Sun YY., Li XL., et al. Research on the Auxiliary Diagnosis of Diabetes Based on Machine Learning Classification Algorithms. Computer Knowledge and Technology. 2024, 20(10):27-29.
[3] Xiang JJ. Application of Machine Learning in Predicting Diabetes. China Science and Technology Information. 2025, (14):77-80.
[4] Gan FW., Zhang LX. Analysis of Prediction Model for Type 2 Diabetes Based on Machine Learning Classification Algorithm. Digital Technology and Application. 2025, 43(06):217-219.
[5] Rufo DD., Debelee TG., Ibenthal A., Negera WG. Diagnosis of Diabetes Mellitus Using Gradient Boosting Machine (LightGBM). Diagnostics. 2021, 11(9):1714.
[6] Zhang DY., Gong YC. The Comparison of LightGBM and XGBoost Coupling Factor Analysis and Prediagnosis of Acute Dean&Francis Weihao Zhou Liver Failure. in IEEE Access, 2020, 8, 220990-221003.
[7] Chen TQ., Guestrin C. XGBoost: A Scalable Tree Boosting System. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD ‘16). 2016, Association for Computing Machinery, New York, NY, USA, 785–794.
[8] Mohammed Mustafa Diabetes prediction dataset 2023.01.01 2025.07.22 https://www.kaggle.com/datasets/iammustafatz/ diabetes-prediction-dataset/discussion
[9] Khurshid MR., Manzoor S., Sadiq T., Hussain L., Khan MS., et al. Unveiling diabetes onset: Optimized XGBoost with Bayesian optimization for enhanced prediction. PLOS ONE. 2025, 20(1): e0310218.
[10] Jaiswal S., Gupta P. Ensemble Approach: XGBoost, CATBoost, and LightGBM for Diabetes Mellitus Risk Prediction. 2022 Second International Conference on Computer Science, Engineering and Applications (ICCSEA), Gunupur, India, 2022, 1-6.
[11] Donepudi S., Nakka R., Thota KK., Ajmeera M., Praveen SP., Sindhura S. (2025). Enhancing Person-Centric Health Care for Diabetes Prediction: A Comparative Study of LightGBM, XGBoost, and Hybrid LIGB Model. In: Barsocchi, P., Naga Srinivasu, P., Kumar Bhoi, A., Palumbo, F. (eds) Enabling Person-Centric Healthcare Using Ambient Assistive Technology, Volume 2. Studies in Computational Intelligence, vol 1191. Springer, Cham.
Downloads
Published
Issue
Section
License
Copyright (c) 2025 by the authors.

This work is licensed under a Creative Commons Attribution 4.0 International License.
