Optimisasi Menu Balita Berdasarkan Gizi Harian Menggunakan XGBoost, Genetic Algorithm dan Particle Swarm Optimization - Evyra Rizki Safitri; Ahmad Muklason (Forum Kerjasama Pendidikan Tinggi, 2026)
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.