Main Article Content
Abstract
Diabetes mellitus is a health problem of global concern, considering that most cases are only identified when complications arise. Therefore, early detection is essential in controlling the health and financial consequences of the disease. The purpose of this study is to compare two machine learning models using gradient boosting techniques, namely Extreme Gradient Boosting (XGBoost) and Light Gradient Boosting Machine (LightGBM). This study use a technique called RandomizedSearchCV to optimize the performance of the proposed machine learning models. In evaluating the machine learning models, the study used a variety of metrics such as accuracy, precision, recall, F1 score, and ROC-AUC. The LightGBM is a more efficient machine learning model than XGBoost based on the result. The LightGBM model had a classification accuracy of 77.3%, a precision of 71.1%, and a recall of 59.3%, which is the same value obtained by the XGBoost model. However, the LightGBM model had a higher F1 score of 64.6% and a ROC-AUC of 83.0% which indicates that the model is more balanced and can accurately classify and distinguish between the two classes. The best-performing machine learning model was integrated with a web-based system using a framework called Streamlit to create a system that is responsive, interactive, and user-friendly. The system is useful for early detection of diabetes mellitus and can be used by non-experts to determine whether a patient is at risk of developing the disease using real-time prediction and user-friendly data input. The results of the study showed that gradient boosting machine learning models can be used to diagnose and detect early cases of diabetes mellitus.
Keywords
Article Details
Copyright (c) 2026 Sischa Wahyuningtyas, Muhammad Al Hafidz

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).
References
- Khurin, I. Wahyuni, A. A. Prayitno, and Y. I. Wibowo, “Efektivitas Edukasi Pasien Diabetes Mellitus Tipe 2 Terhadap Pengetahuan dan Kontrol Glikemik Rawat Jalan di RS Anwar Medika,” Jurnal Pharmascience, vol. 06, no. 01, pp. 1–9, 2019, [Online]. Available: https://ppjp.ulm.ac.id/journal/index.php/pharmascience
- Gojka. Roglic, Global report on diabetes. World Health Organization, 2016.
- “IDF Diabetes Atlas 10th edition 537 million people worldwide have diabetes.” [Online]. Available: www.diabetesatlas.org
- B. Kebijakan Pembangunan, K. Kementerian, and K. Ri, “Dalam Angka Tim Penyusun Ski 2023 Dalam Angka Kementerian Kesehatan Republik Indonesia.”
- M. Bhavsar and M. Patel, “Predicting Cardiovascular Disease with Machine Learning Algorithms: A Review,” ITM Web of Conferences, vol. 65, p. 03011, 2024, doi: 10.1051/itmconf/20246503011.
- R. A. Salasa, H. Rahman, and D. Andiani, “Faktor Risiko Diabetes Mellitus Tipe 2 Pada Populasi Asia: A systematic Review,” Jurnal BIOSAINSTEK, vol. 1, no. 1, 2019, doi: 10.52046/biosainstek.v1i01.306.95-107.
- D. Zhang and Y. Gong, “The Comparison of LightGBM and XGBoost Coupling Factor Analysis and Prediagnosis of Acute Liver Failure,” IEEE Access, vol. 8, pp. 220990–221003, 2020, doi: 10.1109/ACCESS.2020.3042848.
- A. Ramadona, E. Rustam, and M. Syauqie, “Hubungan Kepatuhan Minum Obat dengan Munculnya Gejala Neuropati Pada Pasien Diabetes Melitus Tipe 2 Di Puskesmas Andalas.”
- A. Brahmandjati, A. Mizwar, A. Rahim, and F. Asharudin, “Optimasi Prediksi Diabetes Dengan Algoritma XGBoost Dan Teknik Preprocessing Data.” [Online]. Available: https://www.kaggle.com/datasets/mathchi/diabetes-data-set,
- X. Y. Fu et al., “Development and validation of LightGBM algorithm for optimizing of Helicobacter pylori antibody during the minimum living guarantee crowd based gastric cancer screening program in Taizhou, China,” Prev. Med. (Baltim)., vol. 174, Sep. 2023, doi: 10.1016/j.ypmed.2023.107605.
- F. Caroline and N. Rachmat, “Comparison of XGBoost and LightGBM Algorithms in Predicting Heart Disease,” Brilliance: Research of Artificial Intelligence, vol. 5, no. 2, pp. 1232–1239, Dec. 2025, doi: 10.47709/brilliance.v5i2.7505.
- A. Brahmandjati, A. Mizwar, A. Rahim, and F. Asharudin, “Optimasi Prediksi Diabetes Dengan Algoritma XGBoost Dan Teknik Preprocessing Data.” [Online]. Available: https://www.kaggle.com/datasets/mathchi/diabetes-data-set,
- P. Septiana Rizky, R. Haiban Hirzi, U. Hidayaturrohman, U. Hamzanwadi Selong Jl TGKH Muhammad Zainuddin Abdul Madjid Pancor, and L. Timur, “Perbandingan Metode LightGBM dan XGBoost dalam Menangani Data dengan Kelas Tidak Seimbang,” 2022. [Online]. Available: www.unipasby.ac.id
- E. R. Susanto and A. Cahyana, “Penerapan Algoritma XGBoost untuk Prediksi Diabetes: Analisis Confusion Matrix dan ROC Curve,” Fountain of Informatics Journal, vol. 10, no. 1, pp. 40–50, May 2025, doi: 10.21111/fij.v10i1.14311.
- J. Khatib Sulaiman, D. Wijayanto, B. Pilu Hartato, and U. Amikom Yogyakarta, “Analisis Perbandingan Performa Algoritma XGBoost dan LightGBM pada Klasifikasi Kanker Payudara,” Indonesian Journal of Computer Science.
- W. Zhou, “analysis of Diabetes Prediction Models Based on XgBoost and LightgBM”.
- R. G. Wardhana, G. Wang, and F. Sibuea, “Penerapan Machine Learning Dalam Prediksi Tingkat Kasus Penyakit Di Indonesia,” 2023.
- O. P. Handayani, Purwono, I. A. Ashari, and R. Ardianto, “Systematic Literature Review: Penerapan Machine Learning dalam Diagnosis dan Prediksi Penyakit Diabetes,” Komputa : Jurnal Ilmiah Komputer dan Informatika, vol. 14, no. 2, pp. 108–118, Nov. 2025, doi: 10.34010/komputa.v14i2.16642.
- P. Septiana Rizky, R. Haiban Hirzi, U. Hidayaturrohman, U. Hamzanwadi Selong Jl TGKH Muhammad Zainuddin Abdul Madjid Pancor, and L. Timur, “Perbandingan Metode LightGBM dan XGBoost dalam Menangani Data dengan Kelas Tidak Seimbang,” 2022. [Online]. Available: www.unipasby.ac.id
- R. Siringoringo and R. Perangin-angin, “METHOMIKA: Jurnal Manajemen Informatika & Komputerisasi Akuntansi Model Hibrid Genetic-Xgboost Dan Principal Component Analysis Pada Segmentasi Dan Peramalan Pasar,” vol. 5, no. 2, 2021, doi: 10.46880/jmika.Vol5No2.pp97-103.
- W. Liang, S. Luo, G. Zhao, and H. Wu, “Predicting hard rock pillar stability using GBDT, XGBoost, and LightGBM algorithms,” Mathematics, vol. 8, no. 5, May 2020, doi: 10.3390/MATH8050765.
- D. D. Rufo, T. G. Debelee, A. Ibenthal, and W. G. Negera, “Diagnosis of diabetes mellitus using gradient boosting machine (Lightgbm),” Diagnostics, vol. 11, no. 9, Sep. 2021, doi: 10.3390/diagnostics11091714.
- A. Putranto, N. L. Azizah, I. Ratna, and I. Astutik, “Web-based Heart Disease Prediction System Using SVM Method and Streamlit Framework [Sistem Prediksi Penyakit Jantung Berbasis Web Menggunakan Metode SVM dan Framework Streamlit].” [Online]. Available: https://archive.ics.uci.edu/ml/datasets/heart+disease
- M. Al Hafidz and P. M. Effendi, “Aplikasi Penentuan Kebutuhan Pelatihan Berbasis Kompetensi Untuk Peningkatan Kinerja Staf Analis Laboratorium,” Teknika, vol. 12, no. 2, pp. 129–137, Jun. 2023, doi: 10.34148/teknika.v12i2.622.
References
Khurin, I. Wahyuni, A. A. Prayitno, and Y. I. Wibowo, “Efektivitas Edukasi Pasien Diabetes Mellitus Tipe 2 Terhadap Pengetahuan dan Kontrol Glikemik Rawat Jalan di RS Anwar Medika,” Jurnal Pharmascience, vol. 06, no. 01, pp. 1–9, 2019, [Online]. Available: https://ppjp.ulm.ac.id/journal/index.php/pharmascience
Gojka. Roglic, Global report on diabetes. World Health Organization, 2016.
“IDF Diabetes Atlas 10th edition 537 million people worldwide have diabetes.” [Online]. Available: www.diabetesatlas.org
B. Kebijakan Pembangunan, K. Kementerian, and K. Ri, “Dalam Angka Tim Penyusun Ski 2023 Dalam Angka Kementerian Kesehatan Republik Indonesia.”
M. Bhavsar and M. Patel, “Predicting Cardiovascular Disease with Machine Learning Algorithms: A Review,” ITM Web of Conferences, vol. 65, p. 03011, 2024, doi: 10.1051/itmconf/20246503011.
R. A. Salasa, H. Rahman, and D. Andiani, “Faktor Risiko Diabetes Mellitus Tipe 2 Pada Populasi Asia: A systematic Review,” Jurnal BIOSAINSTEK, vol. 1, no. 1, 2019, doi: 10.52046/biosainstek.v1i01.306.95-107.
D. Zhang and Y. Gong, “The Comparison of LightGBM and XGBoost Coupling Factor Analysis and Prediagnosis of Acute Liver Failure,” IEEE Access, vol. 8, pp. 220990–221003, 2020, doi: 10.1109/ACCESS.2020.3042848.
A. Ramadona, E. Rustam, and M. Syauqie, “Hubungan Kepatuhan Minum Obat dengan Munculnya Gejala Neuropati Pada Pasien Diabetes Melitus Tipe 2 Di Puskesmas Andalas.”
A. Brahmandjati, A. Mizwar, A. Rahim, and F. Asharudin, “Optimasi Prediksi Diabetes Dengan Algoritma XGBoost Dan Teknik Preprocessing Data.” [Online]. Available: https://www.kaggle.com/datasets/mathchi/diabetes-data-set,
X. Y. Fu et al., “Development and validation of LightGBM algorithm for optimizing of Helicobacter pylori antibody during the minimum living guarantee crowd based gastric cancer screening program in Taizhou, China,” Prev. Med. (Baltim)., vol. 174, Sep. 2023, doi: 10.1016/j.ypmed.2023.107605.
F. Caroline and N. Rachmat, “Comparison of XGBoost and LightGBM Algorithms in Predicting Heart Disease,” Brilliance: Research of Artificial Intelligence, vol. 5, no. 2, pp. 1232–1239, Dec. 2025, doi: 10.47709/brilliance.v5i2.7505.
A. Brahmandjati, A. Mizwar, A. Rahim, and F. Asharudin, “Optimasi Prediksi Diabetes Dengan Algoritma XGBoost Dan Teknik Preprocessing Data.” [Online]. Available: https://www.kaggle.com/datasets/mathchi/diabetes-data-set,
P. Septiana Rizky, R. Haiban Hirzi, U. Hidayaturrohman, U. Hamzanwadi Selong Jl TGKH Muhammad Zainuddin Abdul Madjid Pancor, and L. Timur, “Perbandingan Metode LightGBM dan XGBoost dalam Menangani Data dengan Kelas Tidak Seimbang,” 2022. [Online]. Available: www.unipasby.ac.id
E. R. Susanto and A. Cahyana, “Penerapan Algoritma XGBoost untuk Prediksi Diabetes: Analisis Confusion Matrix dan ROC Curve,” Fountain of Informatics Journal, vol. 10, no. 1, pp. 40–50, May 2025, doi: 10.21111/fij.v10i1.14311.
J. Khatib Sulaiman, D. Wijayanto, B. Pilu Hartato, and U. Amikom Yogyakarta, “Analisis Perbandingan Performa Algoritma XGBoost dan LightGBM pada Klasifikasi Kanker Payudara,” Indonesian Journal of Computer Science.
W. Zhou, “analysis of Diabetes Prediction Models Based on XgBoost and LightgBM”.
R. G. Wardhana, G. Wang, and F. Sibuea, “Penerapan Machine Learning Dalam Prediksi Tingkat Kasus Penyakit Di Indonesia,” 2023.
O. P. Handayani, Purwono, I. A. Ashari, and R. Ardianto, “Systematic Literature Review: Penerapan Machine Learning dalam Diagnosis dan Prediksi Penyakit Diabetes,” Komputa : Jurnal Ilmiah Komputer dan Informatika, vol. 14, no. 2, pp. 108–118, Nov. 2025, doi: 10.34010/komputa.v14i2.16642.
P. Septiana Rizky, R. Haiban Hirzi, U. Hidayaturrohman, U. Hamzanwadi Selong Jl TGKH Muhammad Zainuddin Abdul Madjid Pancor, and L. Timur, “Perbandingan Metode LightGBM dan XGBoost dalam Menangani Data dengan Kelas Tidak Seimbang,” 2022. [Online]. Available: www.unipasby.ac.id
R. Siringoringo and R. Perangin-angin, “METHOMIKA: Jurnal Manajemen Informatika & Komputerisasi Akuntansi Model Hibrid Genetic-Xgboost Dan Principal Component Analysis Pada Segmentasi Dan Peramalan Pasar,” vol. 5, no. 2, 2021, doi: 10.46880/jmika.Vol5No2.pp97-103.
W. Liang, S. Luo, G. Zhao, and H. Wu, “Predicting hard rock pillar stability using GBDT, XGBoost, and LightGBM algorithms,” Mathematics, vol. 8, no. 5, May 2020, doi: 10.3390/MATH8050765.
D. D. Rufo, T. G. Debelee, A. Ibenthal, and W. G. Negera, “Diagnosis of diabetes mellitus using gradient boosting machine (Lightgbm),” Diagnostics, vol. 11, no. 9, Sep. 2021, doi: 10.3390/diagnostics11091714.
A. Putranto, N. L. Azizah, I. Ratna, and I. Astutik, “Web-based Heart Disease Prediction System Using SVM Method and Streamlit Framework [Sistem Prediksi Penyakit Jantung Berbasis Web Menggunakan Metode SVM dan Framework Streamlit].” [Online]. Available: https://archive.ics.uci.edu/ml/datasets/heart+disease
M. Al Hafidz and P. M. Effendi, “Aplikasi Penentuan Kebutuhan Pelatihan Berbasis Kompetensi Untuk Peningkatan Kinerja Staf Analis Laboratorium,” Teknika, vol. 12, no. 2, pp. 129–137, Jun. 2023, doi: 10.34148/teknika.v12i2.622.