Diabetes Mellitus Prediction from Primary Health Care Laboratory Data Using Random Forest, Extreme Gradient Boosting, and Light Gradient Boosting Machine with Resampling and Optuna-Based Hyperparameter Optimization

Authors

  • Umar Zaky Informtion System, Universitas Teknologi Yogyakarta, Indonesia
  • Yuwanis Fazlina Agustia Medical Informatics, Universitas Teknologi Yogyakarta, Indonesia

DOI:

https://doi.org/10.52436/1.jutif.2026.7.3.5751

Keywords:

Diabetes Mellitus Prediction, Laboratory test data, Machine learning, Optuna, Resampling Techniques

Abstract

This study examines the use of machine learning models to classify diabetes mellitus status based on laboratory test data. The dataset consists of 484 laboratory test results with 10 clinical parameters, which were used as the main input for model development. Three algorithms, Random Forest, Extreme Gradient Boosting, and Light Gradient Boosting Machine, were compared by applying several resampling techniques and hyperparameter tuning using Optuna to address class imbalance and improve overall model performance. The results show that each algorithm responded differently to the applied resampling methods and tuning strategies, indicating that model performance is influenced by these approaches. Among the evaluated models, Random Forest combined with Synthetic Minority Oversampling Technique and hyperparameter optimization achieved the best performance, with an accuracy of 72.60% and an area under the receiver operating characteristic curve of 76.74%. This performance indicates a moderate ability to distinguish between diabetes and non-diabetes cases based on the available laboratory parameters. Overall, the findings suggest that machine learning can be considered as a potential tool to support clinical decision making, especially when using structured laboratory data. However, given that the performance is still not optimal, further improvement, validation, and exploration of additional data are necessary before considering its implementation in real clinical settings.

Downloads

Download data is not yet available.

References

S. A. Antar et al., “Diabetes mellitus: Classification, mediators, and complications; A gate to identify potential targets for the development of new effective treatments,” Dec. 01, 2023, Elsevier Masson s.r.l. doi: 10.1016/j.biopha.2023.115734.

American Diabetes Association, “Introduction and Methodology: Standards of Care in Diabetes—2024,” Jan. 01, 2024, American Diabetes Association Inc. doi: 10.2337/dc24-SINT.

Kementerian Kesehatan Republik Indonesia, Badan Kebijakan Pembangunan Kesehatan, “Survei Kesehatan Indonesia,” 2023.

C. Z. V. Junus, T. Tarno, and P. Kartikasari, “Klasifikasi menggunakan Metode Support Vector Machine dan Random Forest untuk Deteksi Awal Risiko Diabetes Melitus,” Jurnal Gaussian, vol. 11, no. 3, pp. 386–396, Jan. 2023, doi: 10.14710/j.gauss.11.3.386-396.

I. Permana and F. Nur Salisah, “Pengaruh Normalisasi Data Terhadap Performa Hasil Klasifikasi Algoritma Backpropagation,” Indonesian Journal of Informatic Research and Software Engineering, vol. 2, pp. 67–72, Mar. 2022.

F. Aldi, F. Hadi, N. A. Rahmi, and S. Defit, “Standardscaler’s Potential In Enhancing Breast Cancer Accuracy Using Machine Learning,” Journal of Applied Engineering and Technological Science, vol. 5, no. 1, pp. 401–413, 2023.

E. Sutoyo and M. Asri Fadlurrahman, “Penerapan SMOTE untuk Mengatasi Imbalance Class dalam Klasifikasi Television Advertisement Performance Rating Menggunakan Artificial Neural Network,” Jurnnal Edukasi dan Penelitian Informatika), vol. 6, Dec. 2020.

L. Qadrini, H. Hikmah, and M. Megasari, “Oversampling, Undersampling, Smote SVM dan Random Forest pada Klasifikasi Penerima Bidikmisi Sejawa Timur Tahun 2017,” Journal of Computer System and Informatics (JoSYC), vol. 3, no. 4, pp. 386–391, Sep. 2022, doi: 10.47065/josyc.v3i4.2154.

Y. M. Indah, R. Aristawidya, A. Fitrianto, E. Erfiani, and L. M. R. D. Jumansyah, “Comparison of Random Forest, XGBoost, and LightGBM Methods for the Human Development Index Classification,” Jambura Journal of Mathematics, vol. 7, no. 1, pp. 14–18, Jan. 2025, doi: 10.37905/jjom.v7i1.28290.

D. Cahya and P. Buani, “Deteksi Dini Penyakit Diabetes dengan Menggunakan Algoritma Random Forest,” Jurnal Sains dan Manajemen, vol. 12, no. 1, 2024.

I. Muhamad and M. Matin, “Hyperparameter Tuning menggunakan GridsearchCV pada Random Forest untuk Deteksi Malware,” Politeknik Negeri Jakarta, May 2023. doi: 10.32722/multinetics.v9i1.5578.

J. P. Lai, Y. L. Lin, H. C. Lin, C. Y. Shih, Y. P. Wang, and P. F. Pai, “Tree-Based Machine Learning Models with Optuna in Predicting Impedance Values for Circuit Analysis,” Micromachines (Basel)., vol. 14, no. 2, Feb. 2023, doi: 10.3390/mi14020265.

Nurussakinah, M. Faisal, and I. Budi Santoso, “Algoritma Random Forest dan Synthetic Minority Oversampling Technique (SMOTE) untuk Deteksi Diabetes,” Jurnal Informatika Sunan Kalijaga, vol. 10, no. 2, pp. 223–234, May 2025, Accessed: Apr. 30, 2026. [Online]. Available: https://creativecommons.org/licenses/by-nc/4.0/

M. A. Abubakar, M. Muliadi, A. Farmadi, R. Herteno, and R. Ramadhani, “Random Forest Dengan Random Search Terhadap Ketidakseimbangan Kelas Pada Prediksi Gagal Jantung,” Jurnal Informatika, vol. 10, no. 1, pp. 13–18, Mar. 2023, doi: 10.31294/inf.v10i1.14531.

Perkumpulan Endokrinologi Indonesia, “Pedoman Pengelolaan dan Pencegahan Diabetes Melitus Tipe 2 Dewasa Di Indonesia,” 2021.

M. B. Courtney, “Exploratory Data Analysis in Schools: A Logic Model to Guide Implementation,” International Journal of Education Policy and Leadership, vol. 17, no. 4, May 2021, doi: 10.22230/ijepl.2021v17n4a1041.

R. N. P. Pratama, S. Winarno, and T. N. O. Wijaya, “Thyroid Disease Prediction Using Random Forest with KNNImputer for Missing Values,” sinkron, vol. 9, no. 1, pp. 160–166, Jan. 2025, doi: 10.33395/sinkron.v9i1.14334.

R. Oktafiani, A. Hermawan, and D. Avianto, “Pengaruh Komposisi Split data Terhadap Performa Klasifikasi Penyakit Kanker Payudara Menggunakan Algoritma Machine Learning,” Jurnal Sains dan Informatika, pp. 19–28, Jun. 2023, doi: 10.34128/jsi.v9i1.622.

S. F. Kadir and A. Fairuzabadi, “Analisis Sentimen Ulasan Shopee di Google Play dengan TF-IDF dan Logistic Regression,” RIGGS: Journal of Artificial Intelligence and Digital Business, vol. 4, no. 2, pp. 7940–57945, Jul. 2025, doi: 10.31004/riggs.v4i2.2850.

A. Larasti, S. Surono, A. Thobirin, and D. A. Dewi, “Performance Analysis of Resampling Techniques for Overcoming Data Imbalance in Multiclass Classification,” Jurnal Informatika, vol. 13, pp. 57–66, Mar. 2025.

T. Wongvorachan, S. He, and O. Bulut, “A Comparison of Undersampling, Oversampling, and SMOTE Methods for Dealing with Imbalanced Classification in Educational Data Mining,” Information (Switzerland), vol. 14, no. 1, Jan. 2023, doi: 10.3390/info14010054.

M. Tiara, T. B. Sirait, N. S. Fathonah, and M. N. Fauzan, “Pemanfaatan Algoritma ADASYN dan Support Vector Machine dalam Meningatkan Akurasi Prediksi Kanker Paru-paru,” Jurnal Mahasiswa Teknik Informatika, vol. 8, no. 5, Oct. 2024.

S. Alwaliyanto, G. Kurnia, I. Afrianty, and F. Syafria, “BULLETIN OF COMPUTER SCIENCE RESEARCH Penerapan Metode ADASYN Dalam Mengatasi Imbalanced Data Untuk Klasifikasi Penyakit Stroke Menggunakan Support Vector Machine,” Media Online), vol. 5, no. 4, pp. 532–541, 2025, doi: 10.47065/bulletincsr.v5i4.612.

Y. Sun et al., “Borderline SMOTE Algorithm and Feature Selection‐Based Network Anomalies Detection Strategy,” Energies (Basel)., vol. 15, no. 13, Jul. 2022, doi: 10.3390/en15134751.

X. H. Le, S. Eu, C. Choi, D. H. Nguyen, M. Yeon, and G. Lee, “Machine learning for high-resolution landslide susceptibility mapping: case study in Inje County, South Korea,” Front. Earth Sci. (Lausanne)., vol. 11, 2023, doi: 10.3389/feart.2023.1268501.

Suci Amaliah, M. Nusrang, and A. Aswi, “Penerapan Metode Random Forest Untuk Klasifikasi Varian Minuman Kopi di Kedai Kopi Konijiwa Bantaeng,” VARIANSI: Journal of Statistics and Its application on Teaching and Research, vol. 4, no. 3, pp. 121–127, Dec. 2022, doi: 10.35580/variansiunm31.

A. F. Anjani, D. Anggraeni, and I. M. Tirta, “Implementasi Random Forest Menggunakan SMOTE untuk Analisis Sentimen Ulasan Aplikasi Sister for Students UNEJ,” Jurnal Nasional Teknologi dan Sistem Informasi, vol. 9, no. 2, pp. 163–172, Sep. 2023, doi: 10.25077/teknosi.v9i2.2023.163-172.

H. A. Salman, A. Kalakech, and A. Steiti, “Random Forest Algorithm Overview,” Babylonian Journal of Machine Learning, vol. 2024, pp. 69–79, Jun. 2024, doi: 10.58496/bjml/2024/007.

A. Brahmandjati, A. Mizwar, A. Rahim, and F. Asharudin, “Optimasi Prediksi Diabetes Dengan Algoritma XGBoost Dan Teknik Preprocessing Data,” Jurnal Ilmu Komputer dan Pendidikan, vol. 3, pp. 116–125, Dec. 2024.

A. A. Nafea et al., “A Machine Learning Technique for Early Detection of Gestational Diabetes Mellitus Using SMOTE and Optimized Light Gradient Boosting Machine,” Journal of Artificial Intelligence in Medical Applications (JAIMA), vol. 1, no. 1, pp. 55–63, 2025, Accessed: Apr. 30, 2026. [Online]. Available: https://jaima.uoanbar.edu.iq/index.php/jaima

A. Ainul Yaqin et al., “Implementation of the Random Forest Algorithm with Optuna Optimization in Lung Cancer Classification,” vol. 14, no. 2, Jan. 2025, [Online]. Available: http://sistemasi.ftik.unisi.ac.id

A. Tikaningsih, P. Lestari, A. Nurhopipah, I. Tahyudin, E. Winarto, and N. Hassa, “Optuna Based Hyperparameter Tuning for Improving the Performance Prediction Mortality and Hospital Length of Stay for Stroke Patients,” Telematika, vol. 17, no. 1, pp. 1–16, Feb. 2024, doi: 10.35671/telematika.v17i1.2816.

Ž. Vujović, “Classification Model Evaluation Metrics,” International Journal of Advanced Computer Science and Applications, vol. 12, no. 6, pp. 599–606, 2021, doi: 10.14569/IJACSA.2021.0120670.

W. A. Firmansyach, U. Hayati, and Y. A. Wijaya, “Analisis Terjadinya Overfitting dan Underfitting pada Algoritma Naive Bayes dan Decision Tree dengan Teknik Cross Validation,” Jurnal Mahasiswa Teknik Informatika, vol. 7, no. 1, 2023.

Jude Chukwura Obi, “A comparative study of several classification metrics and their performances on data,” World Journal of Advanced Engineering Technology and Sciences, vol. 8, no. 1, pp. 308–314, Feb. 2023, doi: 10.30574/wjaets.2023.8.1.0054.

A. Cahyana, E. R. Susanto, and Parjito, “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.

H. Kurniawan, A. Dwi Akbar, N. Svensons, Y. Jaya Antonio, S. Karnila, and E. Safitri, “Evaluasi Performa Random Forest, XGBoost, dan LightGBM dalam Diagnosis Dini Diabetes Mellitus,” Jurnal JUPITER, vol. 17, no. 93, pp. 835–844, May 2025.

V. L. Anjani, S. Novalina Turnip, U. N. Uzlifah, and R. Kusumastuti, “Sistem Deteksi Dini Penyakit Diabetes Menggunakan Algoritma Random Forest,” no. Vol. 1 No. 01 (2025): JUSINFO: Jurnal Sistem Informasi, pp. 1–9, Nov. 2025.

Additional Files

Published

2026-07-09

How to Cite

[1]
U. . Zaky and Y. F. . Agustia, “Diabetes Mellitus Prediction from Primary Health Care Laboratory Data Using Random Forest, Extreme Gradient Boosting, and Light Gradient Boosting Machine with Resampling and Optuna-Based Hyperparameter Optimization”, J. Tek. Inform. (JUTIF), vol. 7, no. 3, pp. 3025–3049, Jul. 2026.