Optimisasi Menu Balita Berdasarkan Gizi Harian Menggunakan XGBoost, Genetic Algorithm dan Particle Swarm Optimization
Abstract
Toddler menu planning requires a systematic approach, as menu recommendations must account for nutritional adequacy, the child’s nutritional status, allergy restrictions, and feasible menu combinations. This study develops an allergy-aware decision-support workflow by integrating XGBoost as a menu-class classifier and Genetic Algorithm and Particle Swarm Optimization for daily toddler menu optimization. This approach is chosen because conventional methods that directly apply population-level dietary references values do not adequately capture individual differences in nutritional status and usually do not treat food allergy as a hard constraint during menu generation. Combined of XGBoost and metaheuristics have instantly map non-linear patterns of a toddler’s physical condition while efficiently exploring millions of complex food combinations a task computationally unachievable by conventional manual methods. In the proposed workflow, the XGBoost output in the form of menu class (catch-up nutrition, balanced nutrition, or energy control) is mapped into personalized nutrient targets for energy, protein, fat, and carbohydrates. These targets become the main inputs to the fitness function and guide the allergy-safe candidate filtering step before optimization. The XGBoost model achieved an average accuracy of 96,4% and a weighted F1-score of 96,38% in cross-validation testing, along with an 87,18% accuracy in the hold-out test. Across six experimental categories, both GA and PSO successfully generated menus closely matching the nutritional targets, with RDI scores generally ranging from 94,6% to 99,7%. GA achieved lower nutritional deviation in the catch-up and balanced nutrition scenarios, whereas PSO performed better in energy-control scenarios and consistently required significantly less computation time (averaging 17,74 seconds compared to 79,78 seconds for GA). These findings indicate that GA is preferable when nutritional precision is prioritized, whereas PSO is more suitable for real-time, time-constrained system deployments. The main contributions of this study are the creation of an end-to-end computational framework that adapts to clinical conditions and toddler allergy safe, and the provision of empirical evidence for selecting metaheuristic algorithm for personalized nutrition recommendation systems.
Downloads
References
D. L. Putnick et al., “Displacement of peer play by screen time : associations with toddler development,” Pediatr. Res., vol. 93, no. May, 2022, doi: 10.1038/s41390-022-02261-y.
A. T. Mulyani, M. A. Khairinisa, and A. Khatib, “Understanding Stunting : Impact , Causes , and Strategy to Accelerate Stunting Reduction — A Narrative Review,” Nutrients, vol. 17, no. 9, p. 1493, 2025, doi: 10.3390/nu17091493.
T. Vaivada, N. Akseer, S. Akseer, A. Somaskandan, M. Stefopulos, and Z. A. Bhutta, “Stunting in childhood : an overview of global burden , trends , determinants , and drivers of decline,” Am. J. Clin. Nutr., vol. 112, pp. 777S-791S, 2020, doi: 10.1093/ajcn/nqaa159.
H. P. Sari, L. Permatasari, W. Ayu, and K. Putri, “Perbedaan Keragaman Pangan, Pola Asuh Makan, dan Asupan Zat Gizi Makro pada Balita dari Ibu Bekerja dan Ibu Tidak Bekerja,” no. 60, pp. 2–3, 2021, doi: 10.20473/amnt.v5i3.2021.
N. I. Firdausi, “Peraturan Menteri Kesehatan Republik Indonesia Nomor 2 Tahun 2020 Tentang Standar Antropometri Anak,” Kaos GL Derg., vol. 8, no. 75, pp. 147–154, 2020.
D. A. Wulandari and Z. K. A. Baizal, “Ontology-Based Food Recommender System for Nutrition in School-Age,” vol. 7, no. 4, pp. 2425–2433, 2023.
M. As and E. R. Subhiyakto, “Performance Comparison of Random Forest , SVM , and XGBoost Algorithms with SMOTE for Stunting Prediction,” J. Appl. Informatics Comput., vol. 9, no. 4, pp. 1163–1169, 2025, doi: 10.30871/jaic.v9i4.9701.
D. Bhargava, N. Tyagi, and A. Bhargava, “Optimizing Nutrient Combinations by Differential Evolution Algorithm : A Computational Approach to Dietary Planning,” 2024 4th Int. Conf. Technol. Adv. Comput. Sci., pp. 755–760, 2024, doi: 10.1109/ICTACS62700.2024.10840745.
D. Kurnianingtyas, N. Daud, and L. Muflikhah, “Comparison Genetics Algorithm and Particle Swarm Optimization in Dietary Recommendations for Maternal Nutritional Fulfillment,” SITEKIN J. Sains, Teknol. dan Ind., vol. 21, no. 2, pp. 216–227, 2024, doi: 10.24014/sitekin.v21i2.28937.
U. M. Umoren, B. A. Ojokoh, and O. S. Ijarotimi, “Addressing Malnutrition in School-Aged Children with a Diet Recommender System,” Int. J. Innov. Sci. Res. Technol., vol. 7, no. 9, pp. 1704–1719, 2022, [Online]. Available: https://ijisrt.com/assets/upload/files/IJISRT22SEP1018.pdf
M. Pratama and I. Riyadi, “Identifikasi Nilai Gizi Makro Lemang Berdasarkan Tabel Komposisi Pangan Indonesia (TKPI) dan Analisis Proksimat,” J. Teknol. Pangan dan Gizi, vol. 23, pp. 89–95, 2024, doi: 10.33508/jtpg.v23i2.4885.
G. Salloum and J. Tekli, “Automated and personalized meal plan generation and relevance scoring using a multi-factor adaptation of the transportation problem,” Soft Comput., vol. 26, no. 5, pp. 2561–2585, 2022, doi: 10.1007/s00500-021-06400-1.
Y. Chibber, D. Betala, and S. S, “Diet Recommendation System Using Machine Learning,” pp. 1125–1130, 2023, doi: 10.13052/rp-9788770040723.216.
S. Abhari, K. B. Lankarani, L. Azadbakht, and S. R. N. Kalhori, “Designing and Evaluating a Nutrition Recommender System for Improving Food Security in a Developing Country,” Acad. Med. Sci. I.R. Iran, vol. 26, no. 11, pp. 629–641, 2023, doi: 10.34172/aim.2023.93.
M. K. Ayele, G. A. Baye, and S. H. Yesuf, “Predicting stunting status among under five children in ethiopia using ensemblemachine learning algorithms,” Sci. ReportsRep, vol. 15, p, pp. 1–11, 2025, doi: 10.1038/s41598-025-03206-1.
B. Rao, M. Rashid, and G. Hasan, “Machine Learning in Predicting Child Malnutrition: A Meta-Analysis of Demographic and Health Surveys Data,” Int. J. Environ. Res. Public Heal., vol. 22, no. 3, pp. 1–15, 2025, doi: 10.3390/ijerph22030449.
M. Imani and A. Beikmohammadi, “Comprehensive Analysis of Random Forest and XGBoost Performance with SMOTE , ADASYN , and GNUS Under Varying Imbalance Levels,” Technologies, vol. 13, no. 88, pp. 1–40, 2025, doi: 10.3390/technologies13030088.
E. Arteaga-cabrera, C. Ramírez-márquez, E. Sánchez-ramírez, J. G. Segovia-hernández, O. Osorio-mora, and J. A. Gómez-salazar, “Advancing Optimization Strategies in the Food Industry: From Traditional Approaches to Multi-Objective and Technology-Integrated Solutions,” Appl. Sci., vol. 15, no. 7, pp. 1–31, 2025, doi: 10.3390/app15073846.
P. Aivaliotis-apostolopoulos and D. L. Id, “Swarming genetic algorithm : A nested fully coupled hybrid of genetic algorithm and particle swarm optimization,” PLoS One, pp. 1–24, 2022, doi: 10.1371/journal.pone.0275094.
S. N. Langazane and A. K. Saha, “Effects of Particle Swarm Optimization and Genetic Algorithm Control Parameters on Overcurrent Relay Selectivity and Speed,” IEEE Access, vol. 10, pp. 4550–4567, 2022, doi: 10.1109/ACCESS.2022.3140679.
I. Papastratis, D. Konstantinidis, P. Daras, and K. Dimitropoulos, “OPEN AI nutrition recommendation using a deep generative model and ChatGPT,” Sci. Rep., pp. 1–18, 2024, doi: 10.1038/s41598-024-65438-x.
Bila bermanfaat silahkan share artikel ini
Berikan Komentar Anda terhadap artikel Optimisasi Menu Balita Berdasarkan Gizi Harian Menggunakan XGBoost, Genetic Algorithm dan Particle Swarm Optimization
Pages: 601-610
Copyright (c) 2026 Evyra Rizki Safitri, Ahmad Muklason

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (Refer to The Effect of Open Access).





















