Implementation of the Random Forest Algorithm for Website-Based Diabetes Mellitus Risk Prediction
DOI:
https://doi.org/10.37034/medinftech.v4i3.168Keywords:
Diabetes Mellitus, DiAnalyze, Machine Learning, Random Forest, WebsiteAbstract
Diabetes mellitus is a chronic health condition that continues to increase worldwide and may lead to various severe complications when early risk identification is not performed. This study addresses the limited implementation of machine learning models in practical web-based applications that can assist users in analyzing diabetes risk based on health-related parameters. Therefore, this research aims to develop DiAnalyze, a web-based diabetes risk prediction platform utilizing the Random Forest algorithm. The study used the Diabetes Prediction Dataset obtained from Kaggle, initially containing 100,000 records with eight input features and one target variable. After data preprocessing and class balancing using undersampling, 18,482 records were retained and divided into training, validation, and testing sets using a 64:16:20 ratio. The Random Forest model achieved an accuracy of 90.70%, precision of 89.09%, recall of 90.97%, F1-score of 90.02%, and ROC-AUC of 97.61%. The trained model was successfully integrated into the DiAnalyze web-based platform, enabling users to obtain diabetes risk classifications and corresponding risk probabilities based on the provided health parameters. DiAnalyze is intended as a supporting tool for diabetes risk assessment and does not replace professional medical diagnosis.
Downloads
References
F. Teufel et al., “Diabetes in Adults : Findings From the 2025 IDF Diabetes Atlas Global , Regional , and National Estimates of Undiagnosed Diabetes in Adults : Findings From the 2025 IDF Diabetes Atlas,” Diabetes Care, vol. 49, no. 3, pp. 490–496, 2026, doi: 10.2337/dc25-2583.
E. Safitri, D. Rofianto, N. Purwati, H. Kurniawan, and S. Karnila, “Prediksi Penyakit Diabetes Melitus Menggunakan Algoritma Machine Learning Diabetes Mellitus Disease Prediction using Machine Learning Algorithms,” JUSTIN (Jurnal Sist. dan Teknol. Informasi), vol. 12, no. 4, pp. 760–766, 2024, doi: 10.26418/justin.v12i4.84620.
A. Syahri, U. Fariha, R. Afandi, and I. Nurliyana, “Comparison of Logistic Regression , Random Forest and Adaboost Algorithms for Diabetes Mellitus Classification,” IJATIS Indones. J. Appl. Technol. Innov. Sci., vol. 1, no. February, pp. 41–46, 2024, doi: 10.57152/ijatis.v1i1.1116.
M. C. Ibrahim, “Comparison of Diabetes Prediction Data Using Machine Learning Perbandingan Data Prediksi Diabetes Menggunakan Machine Learning,” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 5, no. 4, pp. 1423–1436, 2025, doi: 10.57152/malcom.v5i4.2301.
N. L. Anggreini, A. Yuliana, D. S. Ramdan, and W. Al-dayyeni, “Improving Diabetes Prediction Performance Using Random Forest Classifier with Hyperparameter Tuning,” J. Tek. Inform., vol. 6, no. 4, pp. 1847–1860, 2025, doi: https://doi.org/10.52436/1.jutif.2025.6.4.4755.
O. P. Handayani, I. A. Ashari, and R. Ardianto, “Systematic Literature Review: Penerapan Machine Learningdalam Diagnosis dan Prediksi Penyakit Diabetes,” KOMPUTA J. Ilm. Komput. dan Inform., vol. 14, no. 2, pp. 3–7, 2025, doi: 10.34010/komputa.v14i2.
C. C. Olisah, L. Smith, and M. Smith, “Computer Methods and Programs in Biomedicine Diabetes mellitus prediction and diagnosis from a data preprocessing and machine learning perspective,” Comput. Methods Programs Biomed., vol. 220, p. 106773, 2022, doi: 10.1016/j.cmpb.2022.106773.
Rianto and P. I. Santosa, “Data Preparation untuk Machine Learning & Deep Learning,” Edisi Pert., Yogyakarta: ANDI, 2025.
F. D. A. and G. F. Fitriana, PENGENALAN BAHASA PEMROGRAMAN PYTHON DAN IMPLEMENTASI MACHINE LEARNING. Yogyakarta: TEKNOSAIN, 2022.
H. Aulia and A. Wibowo, “Integration of Random Forest , ADASYN , and SHAP for Diabetes Prediction and Interpretation,” Sci. J. Informatics, vol. 12, no. 2, pp. 211–222, 2025, doi: 10.15294/sji.v12i2.24314.
K. and A. H. Pratama, Belajar Mudah dan Singkat MACHINE LEARNING. Yogyakarta: ANDI, 2024.
C. N. Noviyanti, “Journal of Information System Early Detection of Diabetes Using Random Forest Algorithm,” J. Inf. Syst. Explor. Res., vol. 2, no. 1, pp. 41–48, 2024, doi: doi: 10.52465/joiser.v2i1.245.
A. P. Suryotomo, B. M. Akbar, and R. Husaini, “Performance Analysis of FastAPI Framework on Lost Circulation Handling Management Application in Oil Well Drilling,” J. Inform. dan Teknol. Inf., vol. 21, no. 1, pp. 110–121, 2024, doi: 10.31515/telematika.v21i1.13259.
B. S. Ahamed, M. S. Arya, and A. O. N. V, “Prediction of Type-2 Diabetes Mellitus Disease Using Machine Learning Classifiers and Techniques,” Front. Comput. Sci., vol. 4, no. May, pp. 1–5, 2022, doi: 10.3389/fcomp.2022.835242.
L. Li et al., “Machine learning for predicting diabetes risk in western China adults,” Diabetol. Metab. Syndr., vol. 15, no. 165, pp. 1–12, 2023, doi: 10.1186/s13098-023-01112-y.
L. Jiang et al., “Diabetes risk prediction model based on community follow-up data using machine learning,” Prev. Med. Reports, vol. 35, no. July, p. 102358, 2023, doi: 10.1016/j.pmedr.2023.102358.
Q. Ou, W. Jin, L. Lin, D. Lin, and K. Chen, “LASSO-based machine learning algorithm to predict the incidence of diabetes in different stages,” Aging Male, vol. 26, no. 1, p., 2023, doi: 10.1080/13685538.2023.2205510.
H. Yousef, S. F. Feng, and H. F. Jelinek, “Exploratory risk prediction of type II diabetes with isolation forests and novel biomarkers,” Sci. Rep., pp. 1–11, 2024, doi: 10.1038/s41598-024-65044-x.
D. Nafisah, A. Ahli, S. R. Nudin, and D. A. Dermawan, “Enhancing Web-Based Diabetes Prediction Using Random Forest Optimization and SMOTE,” Proceeding Int. Jt. Conf. UNESA, vol. 3, no. 2, pp. 1–10, 2023.
H. El-sofany, S. A. El-seoud, O. H. Karam, Y. M. A. El-latif, and I. A. T. F. Taj-eddin, “A Proposed Technique Using Machine Learning for the Prediction of Diabetes Disease through a Mobile App,” Int. J. Intell. Syst., vol. 2024, 2024, doi: 10.1155/2024/6688934.
S. Effati, A. Kamarzardi-torghabe, F. Azizi-froutaghe, and I. Atighi, “Web application using machine learning to predict cardiovascular disease and hypertension in mine workers,” Sci. Rep., pp. 1–14, 2024.
B. Rawat, S. Purnama, and M. Mulyati, “MySQL Database Management System (DBMS) On FTP Site LAPAN Bandung,” Int. J. Cyber IT Serv. Manag., vol. 1, no. 2, pp. 173–179, 2021, doi: 10.34306/ijcitsm.v1i2.47.
R. Malhotra, A. Bansal, and M. Kessentini, “Assessing security vulnerabilities in a docker-enabled federated learning framework with hyperparameter tuning for software bug prediction,” Int. J. Inf. Secur., vol. 25, no. 2, pp. 1–18, 2026, doi: 10.1007/s10207-026-01213-5.







