RANDOM FOREST AND K-MEANS FOOD RECOMMENDATIONS FOR TYPE-2 DIABETES MELLITUS BASED ON GLYCEMIC INDEX
DOI:
https://doi.org/10.33480/jitk.v12i2.8223Keywords:
Glycemic index, K-means, random forest, recommendation system, type-2 diabetes mellitusAbstract
Patients with Type 2 Diabetes Mellitus require appropriate dietary management to maintain stable blood glucose levels. However, selecting suitable foods remains challenging because information regarding glycemic index values and nutritional content is not always readily available or easily understood by patients. This study develops a glycemic index-based food recommendation system by combining the Random Forest and K-Means algorithms. In the proposed system, Random Forest is employed to predict the risk level of each food item using nutritional attributes, while K-Means groups foods with similar characteristics to provide safer alternative food recommendations. The dataset was constructed by integrating the International Tables of Glycemic Index and Glycemic Load Values 2021 with the Indonesian Food Composition Table (TKPI) and subsequently preprocessed before model development. The evaluation results indicate that the combination of Random Forest and SMOTE achieved the best classification performance, with an Accuracy of 93.10%, Precision of 95.86%, and F1-Score of 93.76%. For the clustering task, K-Means produced three clusters with a Silhouette Score of 0.43836. Finally, both models were integrated into a Streamlit-based prototype to support food risk classification and provide alternative food recommendations for patients with diabetes.
Downloads
References
[1] World Health Organization, “Diabetes,” WHO. Accessed: Apr. 12, 2025. [Online]. Available: https://www.who.int/news-room/fact-sheets/detail/diabetes
[2] International Federation of Diabetes, “What Is Diabetes? International Federation of Diabetes,” IDF. Accessed: Apr. 12, 2025. [Online]. Available: https://idf.org/about-diabetes/what-is-diabetes/
[3] International Federation of Diabetes, “IDF Diabetes Atlas Global Diabetes Data & Statistics,” IDF. Accessed: Apr. 12, 2025. [Online]. Available: https://diabetesatlas.org/
[4] M. Peres, H. S. Costa, M. A. Silva, and T. G. Albuquerque, “The Health Effects of Low Glycemic Index and Low Glycemic Load Interventions on Prediabetes and Type 2 Diabetes Mellitus: A Literature Review of RCTs,” Nutrients, vol. 15, no. 24, p. 5060, 2023, doi: 10.3390/nu15245060.
[5] N. A. Elsayed et al., “5. Facilitating Positive Health Behaviors and Well-being to Improve Health Outcomes: Standards of Care in Diabetes—2023,” Diabetes Care, vol. 47, no. 1, pp. S68–S96, 2023, doi: 10.2337/dc23-S005.
[6] J. N. Bondevik, K. E. Bennin, Ö. Babur, and C. Ersch, “A systematic review on food recommender systems,” Expert Syst. Appl., vol. 238, no. 20, p. 4248, 2023, doi: 10.1016/j.eswa.2023.122166.
[7] A. Sosa-Holwerda, O. H. Park, K. Albracht-Schulte, S. Niraula, L. Thompson, and W. Oldewage-Theron, “The Role of Artificial Intelligence in Nutrition Research: A Scoping Review,” Nutr. , vol. 16, no. 13, pp. 1–22, 2024, doi: 10.3390/nu16132066.
[8] M. Ahmad, A. U. Khan, and M. Sajid, “A Diet Recommendation System for Persons with Special Dietary Requirements,” J. Comput. Biomed. Informatics, vol. 5, no. 1, pp. 153–164, 2023.
[9] E. Ahmed, M. Oumer, and M. Hassan, “Diabetes-focused food recommender system (DFRS) to enabling digital health,” PLOS Digit. Heal., vol. 4, no. 2, pp. 1–22, 2025, doi: 10.1371/journal.pdig.0000530.
[10] Q. Tan, Y. Qin, R. Tang, S. Wu, and J. Cao, “A Multi-Layer Classifier Model XR-KS of Human Activity Recognition for the Problem of Similar Human Activity,” Sensors, vol. 23, no. 23, p. 9613, 2023, doi: 10.3390/s23239613.
[11] W. Wunnasri, P. Musikawan, and C. So-In, “A Two-Phase Ensemble-Based Method for Predicting Learners’ Grade in MOOCs,” Appl. Sci., vol. 13, no. 3, p. 1492, 2023, doi: 10.3390/app13031492.
[12] T. E. Eyinla, R. A. Sanusi, and B. Maziya-Dixon, “Evaluation of in vitro and in vivo Glycemic Index of common staples made from varieties of White Yam (Dioscorea rotundata),” Front. Nutr., vol. 9, p. 983212, 2022, doi: 10.3389/fnut.2022.983212.
[13] H. A. Raihana, P. H. Gunawan, and N. Aquarini, “Breaking Class Imbalance: Machine Learning Solutions for Stunting Detection,” Lontar Komput. J. Ilm. Teknol. Inf., vol. 16, no. 2, p. 03, 2025, [Online]. Available: https://ejournal3.unud.ac.id/index.php/lontar/article/view/762
[14] S. Sarmini, W. Ma’arifah, and I. Tahyudin, “Sistem Pendukung Keputusan Berbasis K-Means untuk Evaluasi Keberhasilan Bisnis dan Nilai Perusahaan,” J. Sist. Inf. Bisnis, vol. 14, no. 4, pp. 363–374, 2024, doi: 10.21456/vol14iss4pp363-374.
[15] William and M. E. Johan, “Implementation of Customer Segmentation Model using K-Means and DBSCAN for Fashion Industry Product Transaction,” Int. J. Informatics Vis., vol. 9, no. 6, pp. 2559–2568, 2025, doi: 10.62527/joiv.9.6.2978.
[16] Firdaus et al., “Text clustering for analyzing scientific article using pre-trained language model and k-means algorithm,” Bull. Electr. Eng. Informatics, vol. 14, no. 5, pp. 3728–3740, 2025, doi: 10.11591/eei.v14i5.9670.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Malik Aziz Ramadhan, Yohani Setiya Rafika Nur, Dany Candra Febrianto

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




-a.jpg)
-b.jpg)












