Implementation of Random Forest Algorithm in a Web Application as an Early Detection Tool for Diabetes

Authors

  • Habibul Fauzan
  • Elin Haerani
  • Fitra Kurnia State Islamic University of Sultan Syarif Kasim Riau
  • Novi Yanti State Islamic University of Sultan Syarif Kasim Riau

DOI:

https://doi.org/10.37859/coscitech.v7i1.11261
Keywords: Diabetes, Random Forest, SMOTE, Web Application, Early Detecion Diabetes, Random Forest, SMOTE, Aplikasi Web, Deteksi Dini

Abstract

Diabetes is a chronic metabolic disease and one of the leading causes of death worldwide, with the number of sufferers projected to reach 1.3 billion by 2050. Delayed diagnosis remains a primary challenge, as nearly half of those affected are unaware of their condition in the early stages, thereby increasing the risk of fatal complications. Data mining approaches using classification algorithms have been widely utilized for early screening. However, the development of medical record models is often hindered by imbalanced data, which causes models to be biased toward the majority class and reduces detection sensitivity for the minority class (patients with diabetes). Furthermore, there is a lack of research integrating these predictive models into responsive application interfaces for end-users. Consequently, this study implements Random Forest optimized with the SMOTE (Synthetic Minority Over-sampling Technique) into a web-based application to serve as a practical early detection tool. Random Forest was selected for its ability to handle complex data and reduce the risk of overfitting. The research stages include data preprocessing, balancing training data using SMOTE, model parameter adjustment through hyperparameter tuning with Grid Search, and the development of a client-server architecture using AstroJS and Flask. The evaluation results demonstrate that the use of SMOTE significantly improves the model's ability to identify the minority class. The model achieved a Recall of 75.0% and an overall accuracy of 95.8%, effectively minimizing False Negative errors. The developed application was verified through Black Box Testing and was declared successful as a responsive and accessible early detection tool for both healthcare professionals and the general public.

Downloads

Download data is not yet available.

References

F. Marwati dan R. Fauzi, “Prediksi Penyakit Diabetes Melitus Menggunakan Jaringan Syaraf Tiruan dengan Metode Backpropagation,” Jurnal Informatika Utama, vol. 2, no. 1, hlm. 26–34, Mei 2024, doi: 10.55903/jitu.v2i1.163.

Y. S. M. Silitonga dkk., “PENDEKATAN KEDOKTERAN KELUARGA PADA DIABETES MELLITUS DENGAN KOMPLIKASI KRONIS,” vol. 1, 2024.

X. Lin dkk., “Global, regional, and national burden and trend of diabetes in 195 countries and territories: an analysis from 1990 to 2025,” Scientific Reports, vol. 10, no. 1, hlm. 14790, Sep 2020, doi: 10.1038/s41598-020-71908-9.

K. L. Ong dkk., “Global, regional, and national burden of diabetes from 1990 to 2021, with projections of prevalence to 2050: a systematic analysis for the Global Burden of Disease Study 2021,” The Lancet, vol. 402, no. 10397, hlm. 203–234, Jul 2023, doi: 10.1016/S0140-6736(23)01301-6.

U. Ahmed dkk., “Prediction of Diabetes Empowered With Fused Machine Learning,” IEEE Access, vol. 10, hlm. 8529–8538, 2022, doi: 10.1109/ACCESS.2022.3142097.

M. Wahidin dkk., “Projection of diabetes morbidity and mortality till 2045 in Indonesia based on risk factors and NCD prevention and control programs,” Sci Rep, vol. 14, no. 1, hlm. 5424, Mar 2024, doi: 10.1038/s41598-024-54563-2.

D. W. Soeatmadji, R. Rosandi, M. R. Saraswati, R. P. Sibarani, dan W. O. Tarigan, “Clinicodemographic Profile and Outcomes of Type 2 Diabetes Mellitus in the Indonesian Cohort of DISCOVER: A 3-Year Prospective Cohort Study.,” J ASEAN Fed Endocr Soc, vol. 38, no. 1, hlm. 68–74, 2023, doi: 10.15605/jafes.038.01.10.

J. Zhang, Z. Zhang, K. Zhang, X. Ge, R. Sun, dan X. Zhai, “Early detection of type 2 diabetes risk: limitations of current diagnostic criteria,” Front Endocrinol (Lausanne), vol. 14, hlm. 1260623, Nov 2023, doi: 10.3389/fendo.2023.1260623.

A. Prastyo, S. Sutikno, dan K. Khadijah, “Improving support vector machine and backpropagation performance for diabetes mellitus classification,” Computer Science and Information Technologies, vol. 5, no. 2, hlm. 140–149, Jul 2024, doi: 10.11591/csit.v5i2.pp140-149.

M. Nur, “Data Mining Untuk Memprediksi Kelulusan Mahasiswa Jurusan Teknik Informatika UIN Syarif Hidayatullah Jakarta Menggunakan Metode Klasifikasi C4.5,” bachelorThesis, Fakultas Sains dan Teknologi Universitas Islam Negeri Syarif Hidayatullah Jakarta, 2022. Diakses: 14 Juli 2025. [Daring]. Tersedia pada: https://repository.uinjkt.ac.id/dspace/handle/123456789/65006

A. P. Silalahi, H. G. Simanullang, dan M. I. Hutapea, “SUPERVISED LEARNING METODE K-NEAREST NEIGHBOR UNTUK PREDIKSI DIABETES PADA WANITA,” METHOMIKA: Jurnal Manajemen Informatika & Komputerisasi Akuntansi, vol. 7, no. 1, Art. no. 1, Apr 2023, doi: 10.46880/jmika.Vol7No1.pp144-149.

S. U. Putri, E. Irawan, dan F. Rizky, Kesatria : Jurnal Penerapan Sistem Informasi (Komputer dan Manajemen), vol. 2, no. 1, Art. no. 1, Jan 2021, doi: 10.30645/kesatria.v2i1.56.

S. Samet, M. R. Laouar, I. Bendib, dan S. Eom, “Analysis and Prediction of Diabetes Disease Using Machine Learning Methods:,” International Journal of Decision Support System Technology, vol. 14, no. 1, hlm. 1–19, Jul 2022, doi: 10.4018/IJDSST.303943.

E. Priande dan G. M. Zamroni, “PENGEMBANGAN SISTEM PREDIKSI HARGA MOBIL BEKAS OLX MENGGUNAKAN ALGORITHMA RANDOM FOREST,” vol. 12, no. 1, 2024.

N. Anisa dan A. Kurniawan, “The Diabetes Prediction Using Flask and Decision Tree Classifier with Cross-Validation: Prediksi Diabetes Menggunakan Flask dan Decision Tree Classifier dengan Validasi Silang,” Install: Information System and Technology Journal, vol. 1, no. 1, hlm. 35–44, Jun 2024, doi: 10.33859/install.v1i1.548.

D. Lal dan A. V. S, “Exploring the Efficacy of Machine Learning Algorithms for Diabetes Prediction: A Comparative Prediction,” IJRASET, vol. 11, no. 5, hlm. 2904–2910, Mei 2023, doi: 10.22214/ijraset.2023.51565.

F. Alghifari dan D. Juardi, “PENERAPAN DATA MINING PADA PENJUALAN MAKANAN DAN MINUMAN MENGGUNAKAN METODE ALGORITMA NAÏVE BAYES: Studi Kasus : Makan Barbeque Sepuasnya,” JURNAL ILMIAH INFORMATIKA, vol. 9, no. 02, hlm. 75–81, Sep 2021, doi: 10.33884/jif.v9i02.3755.

Y. Zhao dkk., “On the Impact of Sample Duplication in Machine-Learning-Based Android Malware Detection,” ACM Trans. Softw. Eng. Methodol., vol. 30, no. 3, hlm. 1–38, Jul 2021, doi: 10.1145/3446905.

J. Kuswanto dan L. Hakim, “Penerapan Algoritma Random Forest untuk memprediksi Performa Akademik Mahasiswa,” 2025.

J. Halif, D. Wahiddin, I. Sanjaya, dan S. Faisal, “Model Regresi Linear Berganda untuk Prediksi Tingkat Pengangguran di Provinsi Jawa Barat,” Jurnal Algoritma, vol. 22, no. 1, hlm. 324–335, Mei 2025, doi: 10.33364/algoritma/v.22-1.2312.

M. Faisal dan I. B. Santoso, “Algoritma Random Forest dan Synthetic Minority Oversampling Technique (SMOTE) untuk Deteksi Diabetes”.

R. Saputra dan A. J. P. Sibarani, “Implementasi Data Mining Menggunakan Algoritma Apriori Untuk Meningkatkan Pola Penjualan Obat | JATISI,” Agu 2020, Diakses: 2 Maret 2026. [Daring]. Tersedia pada: https://jurnal.mdp.ac.id/index.php/jatisi/article/view/195

U. K. J. Dn dan M. Rahardi, “Analysis of SMOTE and Random Search on Machine Learning Algorithms for Stroke Disease Diagnosis,” vol. 10, no. 1.

M. F. Martias, J. Jasril, S. Sanjaya, L. Handayani, dan F. Yanto, “Klasifikasi Citra Daging Sapi dan Daging Babi Menggunakan CNN Arsitektur EfficientNet-B6 dan Augmentasi Data,” Jurnal Sistem Komputer dan Informatika (JSON), vol. 4, no. 4, Art. no. 4, Jun 2023, doi: 10.30865/json.v4i4.6195.

D. Normawati dan S. A. Prayogi, “Implementasi Naïve Bayes Classifier Dan Confusion Matrix Pada Analisis Sentimen Berbasis Teks Pada Twitter,” J-SAKTI (Jurnal Sains Komputer dan Informatika), vol. 5, no. 2, Art. no. 2, Sep 2021, doi: 10.30645/j-sakti.v5i2.369.

E. A. Novia, W. I. Rahayu, dan C. Prianto, Sistem perbandingan algoritma k-means dan naïve bayes untuk memprediksi prioritas pembayaran tagihan rumah sakit berdasarkan tingkat kepentingan. Kreatif, 2021. [Daring]. Tersedia pada: https://books.google.co.id/books?id=MND9DwAAQBAJ

V. M. Putri, B. A. Wisesa, I. A. Edyyul, dan S. A. Darma, “Sistem Pakar Deteksi Keterlambatan Bicara Anak Menggunakan Forward Chaining dan Naïve Bayes,” no. 2, 2025.

Downloads

Published

2025-04-28

How to Cite

Fauzan, H., Haerani, E., Kurnia, F., & Yanti, N. (2025). Implementation of Random Forest Algorithm in a Web Application as an Early Detection Tool for Diabetes. Jurnal CoSciTech (Computer Science and Information Technology), 7(1), 75–83. https://doi.org/10.37859/coscitech.v7i1.11261