Implementation of Random Forest Algorithm for Web-Based Toddler Nutritional Status Classification
DOI:
https://doi.org/10.55537/cosie.v5i4.1840Keywords:
Random Forest, Nutritional Status Classification, Toddler, Stunting, Web ApplicationAbstract
Stunting remains a persistent public health challenge in Indonesia, affecting 21.6% of children under five according to the 2022 Indonesian Nutrition Status Survey (SSGI), while nutritional status classification at Posyandu Makmur 1 is still performed manually using the WHO z-score table, a process prone to human error. This study integrates a Random Forest algorithm, optimized through 5-fold Grid Search Cross-Validation, to classify toddler nutritional status into four categories (severe malnutrition, undernutrition, normal nutrition, and overnutrition) based on anthropometric data, and implements the resulting model into a Flask-based web application developed using the Rapid Application Development (RAD) method. The model was trained on 263 records of toddlers aged 0-59 months (80:20 train-test split) and evaluated on 53 test samples, achieving 83.02% accuracy with n_estimators=200 and max_depth=15. However, additional evaluation using macro F1-score (59.90%) and balanced accuracy (61.64%) reveals a substantial performance drop for minority classes, particularly undernutrition, due to class imbalance in the dataset. Feature importance analysis identified height (35.5%) and age (30.1%) as the most influential predictors, consistent with the height-for-age Z-score formula used for data labeling. The resulting system passed both White Box and Black Box testing, confirming its functional readiness as an early screening tool at primary health services, and underscoring the need for class imbalance mitigation strategies in future machine learning-based nutritional classification research
Downloads
References
[1] R. Sentika et al., “Expert Consensus on Interprofessional Collaboration ( IPC ) Guidelines on Stunting Management in Indonesian Primary Healthcare ( Puskesmas ),” Open Public Health J., pp. 1–12, 2024, doi: 10.2174/0118749445352608241119164446.
[2] Muhammad Davin Diza Ghifary, Chairunisah, Said Iskandar Al Idrus, Faridawaty Marpaung, and Kana Saputra, “Classification of Stunting using a Website-Based Support Vector Machine (SVM) Algorithm (Case Study: Pagar Merbau Community Health Center),” Journal of Artificial Intelligence and Engineering Applications (JAIEA), vol. 5, no. 1, pp. 2001–2006, 2025, doi: 10.59934/jaiea.v5i1.1774.
[3] I. Ozcan, H. Aydin, and A. Cetinkaya, “Comparison of Classification Success Rates of Different Machine Learning Algorithms in the Diagnosis of Breast Cancer,” Asian Pacific Journal of Cancer Prevention, vol. 23, no. 10, pp. 3287–3297, 2022, doi: 10.31557/APJCP.2022.23.10.3287.
[4] W. S. Lestari, Y. M. Saragih, and Caroline, “Comparison of Deep Neural Networks and Random Forest Algorithms for Multiclass Stunting Prediction in Toddlers,” Teknika, vol. 13, no. 3, pp. 412–417, 2024, doi: 10.34148/teknika.v13i3.1063.
[5] Mundirin, Idawati, and I. Latief, “Klasifikasi Status Gizi Balita Berbasis Data Antropometri menggunakan Random Forest,” Journal of Computer Science and Informatics Engineering, vol. 4, no. 4, pp. 324–333, 2025, [Online]. Available: https://journal.aira.or.id/index.php/cosie/article/view/1175
[6] M. Fatmawati, B. A. Herlambang, and N. Q. Nada, “Random Forest Algorithm for Toddler Nutritional Status Classification Website,” Journal of Applied Informatics and Computing (JAIC), vol. 8, no. 2, pp. 428–433, 2024.
[7] R. Belferik, F. M. Sinaga, M. A. S. Manullang, and T. Sinaga, “Addressing Class Imbalance in Stunting Classification Using SMOTE Enhanced Random Forest,” Sinkron : Jurnal dan Penelitian Teknik Informatika, vol. 9, no. 4, pp. 2108–2116, 2025.
[8] Z. I. Bimawan, T. Astuti, and P. Arsi, “Comparison of Random Forest, K-Nearest Neighbor, Decision Tree, and Xgboost Algorithms for Detecting Stunting in Toddlers,” Jurnal Teknik Informatika (Jutif), vol. 5, no. 6, pp. 1599–1607, 2024, doi: 10.52436/1.jutif.2024.5.6.2629.
[9] A. H. Mubarok, P. Pujiono, D. Setiawan, D. F. Wicaksono, and E. Rimawati, “Parameter Testing on Random Forest Algorithm for Stunting Prediction,” Sinkron, vol. 9, no. 1, pp. 107–116, 2025, doi: 10.33395/sinkron.v9i1.14264.
[10] T. Sugihartono, B. Wijaya, Marini, A. F. Alkayes, and H. A. Anugrah, “Optimizing Stunting Detection through SMOTE and Machine Learning: a Comparative Study of XGBoost, Random Forest, SVM, and k-NN,” Journal of Applied Data Sciences, vol. 6, no. 1, pp. 667–682, 2025, doi: 10.47738/jads.v6i1.494.
[11] Elan Suherlan, Shindy Arti, Siti Nabilah, and Zahwah Hazimah, “Penerapan Flask Framework Untuk Deployment Model Machine Learning Dalam Mendukung Analisis Adaptasi Mahasiswa Pada Pembelajaran Daring,” PINTER : Jurnal Pendidikan Teknik Informatika dan Komputer, vol. 9, no. 1, pp. 110–117, 2025, doi: 10.21009/pinter.9.1.15.
[12] A. Meyliana, P. T. Rapiyanta, and A. Andriani, “Application of the Rapid Application Development (RAD) Method for Web-Based Financial Management and Wood Inventory Using CodeIgniter,” ARRUS Journal of Engineering and Technology, vol. 4, no. 1, pp. 81–89, 2024, doi: 10.35877/jetech2722.
[13] M. Ibrahim, “Evolution of Random Forest from Decision Tree and Bagging : A Bias-Variance Perspective,” vol. 7, no. 1, pp. 66–71, 2022.
[14] I. Fadil, R. S. Manggala, E. Firmansyah, and M. A. Helmiawan, “Performance Optimization of Support Vector Machine with SMOTE for Multiclass Stunting Prediction in Sumedang District , Indonesia,” vol. 6, no. 4, pp. 2917–2928, 2025.
[15] S. Lestari, “Prediction of Stunting in Toddlers Using Bagging and Random Forest Algorithms,” Sinkron : Jurnal dan Penelitian Teknik Informatika, vol. 8, no. 2, pp. 947–955, 2024.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Muhammad Raddhyan, Deanna Durbin Hutagalung

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


