AI Diet Planner Using Neural Network with Knapsack Optimizer
DOI:
https://doi.org/10.1234/93w3td44Keywords:
Neural Networks, Knapsack Optimization, Diet Planning, Meal Scheduling, Personalized NutritionAbstract
Dietary management is a fundamental component of preventive healthcare, yet individuals often struggle to formulate nutritionally balanced meal plans that align with personal health objectives, physiological constraints, and budgetary limitations. This paper presents an intelligent diet planning system that integrates a feedforward neural network with a dynamic programming-based 0/1 Knapsack optimization algorithm to generate personalized daily meal schedules. The neural network is trained on a curated health and nutrition dataset to predict optimal macronutrient ratios—proteins, carbohydrates, fats, vitamins, and minerals—based on user-specific inputs such as age, body mass index, health goals, and known food allergies. Once target nutritional profiles are established, the Knapsack optimizer selects the most nutritionally dense food items from a structured food database while respecting caloric budgets and cost constraints. The system generates structured meal plans comprising breakfast, lunch, dinner, and snack components. A continuous feedback loop enables the system to adapt predictions based on user responses, improving personalization accuracy over successive days. Experimental evaluation demonstrates that the proposed hybrid model achieves a mean absolute error of 3.8% in nutrient prediction and outperforms conventional static diet applications in user satisfaction and adherence metrics. The system offers a practical and scalable AI-powered alternative to manual dietary consultation.
