Dietary Recommendation System Based on Machine Learning
G. Lucy, K. Meghana, Damagatla Sowmya, G. Rajeswari and K. Suma Latha
Department of Computer Science and Engneering, Ravindra College of Engineering for Women,
Kurnool, Andhra Pradesh, India
Keywords: Diet Recommendation, Machine Learning, Decision Tree Classifier, Personalized Nutrition, Health
Monitoring, AI in Healthcare, Dietary Planning, Chronic Disease Management, Nutritional Guidance,
Data-Driven Dieting.
Abstract: In order to make nutrition recommendations based on machine learning, this research employs a Decision
Tree Classifier. Dietary restrictions, physical activity levels, age, gender, BMI, disease type, severity, and
training data are all inputs into the model. The system accurately predicts outcomes, encodes categorical
factors, and partitions the dataset for testing and training. Diet recommendations tailored to the user's input
can be made in real-time by saving the trained model. For optimal health, the model suggests tailored meal
patterns that include Low-Carb, Low-Sodium, and Balanced foods.
1 INTRODUCTION
In today's fast-paced world, it is crucial for well-being
to eat healthily. It is rare for traditional diet regimens
to account for a person's unique health status, food
restrictions, and way of life. Poor diet adherence and
the risk of chronic diseases are outcomes of many
people's struggles to choose meals that fulfil their
health demands. More than ever before, there is a
demand for tailored, data-driven dietary advice.
Better patient outcomes can be achieved by data-
driven healthcare decision-making made possible by
machine learning. By analysing large amounts of
health data, machine learning algorithms can spot
patterns and provide reliable forecasts. Incorporating
body mass index (BMI), disease kind and severity,
degree of physical activity, and dietary preferences
into personalised nutrition plans might be a machine
learning-based approach. People are better able to
achieve their health goals and benefit from nutritional
interventions as a result.
A Decision Tree Classifier is employed in the
proposed method to provide dietary recommendations
according to health criteria. A huge dataset including
demographic information (gender, age, weight, blood
pressure, glucose, and food restrictions) is used to
train the algorithm. Following training, the model
might recommend a Balanced, Low-Carb, or Low-
Sodium diet depending on the patient's condition.
Quickly and accurately, this automated diet planner
provides guidance.
An important advantage of this technology is its
ability to quickly assess user input and provide dietary
recommendations. Customers receive practical and
attainable dietary guidance from the system in the
form of personalised meal plans based on the
anticipated diet category. Over time, the model
becomes better at delivering accurate and useful
suggestions as it learns from new data.
Fast, quick, and tailored healthy eating is now a
reality with this technology that suggests diets based
on machine learning. It improves people's quality of
life by using modern data science to better manage
their health and food. By offering individualised meal
plans grounded in scientific research, this method
contributes to the promotion of long-term health.
2 LITERATURE SURVEY
2.1 Personalized Diet Recommendation
System Using Machine Learning:
Individuals can get health and nutrition advice from
the "Personalised Diet Recommendation System"
using machine learning. Using user-supplied data, this
project constructs an ML model to provide dietary and
health-related suggestions tailored to each individual.
278
Lucy, G., Meghana, K., Sowmya, D., Rajeswari, G. and Latha, K. S.
Dietary Recommendation System Based on Machine Learning.
DOI: 10.5220/0013911800004919
Paper published under CC license (CC BY-NC-ND 4.0)
In Proceedings of the 1st International Conference on Research and Development in Information, Communication, and Computing Technologies (ICRDICCT‘25 2025) - Volume 4, pages
278-282
ISBN: 978-989-758-777-1
Proceedings Copyright © 2026 by SCITEPRESS Science and Technology Publications, Lda.
The model takes into account factors such as age,
gender, dietary goals, activity intensity, and weight
loss targets. The next step is for it to say if the user is
slim or not. After doing the necessary analysis, the
system will provide meal plans for the day. You may
find nutritional information and cooking directions for
individual meals in these programs. It is advised that
at each meal, favoured foods be selected from a
variety of categories. The system takes a person's
dietary consumption into account and displays the
results graphically in a pie chart. User preferences,
body mass index (BMI), and physical characteristics
inform our project's output designs.
2.2 AI Nutrition Recommendation
Using a Deep Generative Model and
ChatGPT:
Advanced AI nutrition systems have recently
emerged, thanks to recent advancements in AI, to
enhance tailored dietary guidance and overall health
and wellness. There are concerns regarding the
accuracy and reliability of AI systems' nutritional
recommendations because to the absence of
professional norms. A state-of-the-art AI nutrition
advising system that adheres to dietary rules is
developed using new complex loss functions in
conjunction with the speed and explainability of deep
generative networks. Make accurate predictions about
users' anthropometrics and medical conditions in
descriptive latent space using a variational
autoencoder and an optimiser to alter meal portions
depending on energy demands, the system provides
customised, healthy, and highly accurate weekly meal
plans. The proposed method has the potential to
increase meal diversity, accuracy, and generalisability
using ChatGPT's unparalleled library of meals from
many cuisines. The suggested diet recommendation
method can be readily incorporated into upcoming
diet recommendation systems and produces weekly
meal plans that fulfil users' dietary and energy
requirements, according to extensive trials conducted
on 84000 daily meal plans for virtual users and 3000
real users with 7,000 daily meal plans.
2.3 A Food Recommender System
Considering Nutritional
Information and User Preferences
Health problems that do not spread from person to
person are on the rise, according to the World Health
Organisation. These include cancer, diabetes, and
premature heart disease. Poor dietary habits are
associated with several diseases. Individuals' unique
physical, physiological, and personal traits inform a
novel area of research known as "personalised
nutrition," which provides dietary recommendations.
Specifically, by integrating user data with nutritional
information, several recent research have created
computer models for customised meal selection.
Unlike previous attempts, this research presents a
global framework for recommendation of daily meal
plans that handles information on preferences and
nutrition at the same time. The idea uses AHPSort, a
method for multi-criteria decision analysis, to screen
out foods that won't work for the people using the
concept right now. A daily meal plan that takes into
account the user's preferences, eating habits, and
nutritional requirements is generated through an
optimization-based stage. Using a case study, the
recommender system is tested.
2.4 AI-Driven Nutritional Assessment
Improving Diets with Machine
Learning and Deep Learning for
Food Image Classification:
For optimal health and to stay away from food-borne
illnesses, a well-balanced diet is a must. In order to
address this critical public health concern, we employ
DL techniques and ML to categorise food photos and
anticipate important attributes. For effective good and
bad food product classification, our approach employs
a sophisticated hybrid model that mixes a deep
learning CNN with a SVM. Using the SVM classifier
for classification, the CNN-based method streamlines
feature extraction. Using a tailored dataset, we
evaluated our approach. With a 97% and 94%
accuracy rate, respectively, our hybrid model
outperforms the CNN model in the experiments.
Improvements in recollection, f1-score, and accuracy
are also seen.
2.5 Intelligent Personalized Nutrition
Guidance System Using IoT and
Machine Learning Algorithm
There has been a global uptick in dietary issues.
Problems like diabetes, obesity, and weight gain can
stem from a poorly balanced diet. The system is able
to assess food images in novel ways to suggest better
eating habits thanks to the integration of image
processing. To get useful information out of food
photo data, we combine machine learning, the internet
of things (IoT), and image processing. Images of food
taken using smartphones and other specialist cameras
are uploaded to the cloud for analysis. This study
Dietary Recommendation System Based on Machine Learning
279
proposes a novel approach to building a system that
gives individualised dietary recommendations by
utilising SVM and IoT technology. SVM searches for
correlations, trends, and dietary requirements in this
data. All eating habits are saved in our database on the
cloud. Calories and nutrients may be calculated using
this method, which makes use of image processing
and segmentation. The nutritional value, serving size,
and food type labels provide the algorithm with a
wealth of dietary data from which to learn. This
trained SVM model is utilised by the system to
evaluate the nutritional requirements, deficiencies,
and personalised dietary goals of users.
3 METHODOLOGY
3.1 Proposed System
The proposed system utilizes machine learning,
specifically a Decision Tree Classifier, to generate
personalized diet recommendations based on an
individual's health attributes. By analyzing various
parameters such as age, BMI, disease type, severity,
physical activity level, and dietary restrictions, the
system predicts the most suitable dietary plan,
including Low-Carb, Low-Sodium, or Balanced
Diets. The model is trained on a diverse dataset to
ensure accurate classification and effective meal
suggestions tailored to the user’s specific health needs.
To enhance efficiency, the system automates data
processing, encodes categorical values, and performs
real-time analysis to deliver instant dietary
recommendations. Users simply input their health
information, and the model evaluates their data to
suggest an appropriate meal plan. Unlike traditional
methods that require manual consultation, this AI-
driven approach provides quick, reliable, and
scientifically backed dietary advice.
Among the many benefits of this approach is its
ability to generate customized meal plans, ensuring
that individuals receive practical and actionable
dietary guidance. The automation reduces human
intervention, making it a more accessible and scalable
solution for personalized nutrition planning. By
continuously learning from new health data, the
system refines its recommendations over time, leading
to improved adherence and better health outcomes for
users.
3.2 System Architecture
The architecture of the suggested AI-driven diet
recommendation system consists of multiple stages,
ensuring efficient processing and accurate dietary
predictions (figure 1). Initially, user input is collected,
including health attributes such as age, BMI, disease
type, severity, physical activity level, and dietary
restrictions. This data undergoes preprocessing, where
missing values are handled, categorical variables are
encoded, and numerical features are normalized for
optimal model performance.
The Decision Tree Classifier is then applied to
analyze the processed data, identifying patterns and
relationships between health parameters and dietary
requirements. Based on the classification, the model
predicts an appropriate diet plan, such as Low-Carb,
Low-Sodium, or Balanced Diets. The system then
generates personalized meal plans, ensuring users
receive actionable dietary guidance tailored to their
specific health conditions.
Figure 1: Proposed Architecture.
3.3 Modules
3.3.1 User
In this application user is a module, should register
with the application then only he can login into his/her
account. After successful login he/she can able to enter
the input data and can view recommended diet and diet
plan and logout.
3.3.2 Admin
Here admin is a module can login directly with his
predefined username and password after successful
login he can able to upload dataset into the application,
and applying preprocess to get all categorical columns
and applying label encoding then split data into
ICRDICCT‘25 2025 - INTERNATIONAL CONFERENCE ON RESEARCH AND DEVELOPMENT IN INFORMATION,
COMMUNICATION, AND COMPUTING TECHNOLOGIES
280
training and testing, building decision tree model and
save model and logout.
3.4 Algorithms - Decision Tree
Classifier
The Decision Tree Classifier is used in this project to
predict personalized diet recommendations based on
various health parameters. It operates by recursively
splitting the dataset into nodes, where each node
represents a decision based on a specific feature (such
as BMI, disease type, or activity level). The tree
structure allows the model to classify users into
different diet categories, such as Low-Carb, Low-
Sodium, or Balanced Diets, based on their unique
health profiles.
During training, the algorithm processes a dataset
containing age, gender, BMI, disease severity,
physical activity level, and dietary restrictions as input
features. The Decision Tree Classifier uses entropy or
Gini index to determine the best feature for splitting
the data at each step. A final dietary recommendation
is given when the tree reaches a node in the leaf
canopy.
Once trained, the model can quickly classify new
user inputs by traversing the decision tree and
selecting the most appropriate diet plan. For example,
if a user has high BMI, diabetes, and low physical
activity, the model may classify them under the Low-
Carb Diet category. Similarly, a user with
hypertension and moderate activity levels may be
recommended a Low-Sodium Diet.
The key advantage of using a Decision Tree
Classifier is its ability to provide clear, interpretable
recommendations while efficiently handling
categorical and numerical data. Additionally, the
model can be continuously updated with new dietary
data, improving accuracy over time and ensuring users
receive the most relevant nutritional guidance.
4 EXPERIMENTAL RESULTS
Accuracy: How well a test can differentiate between
healthy and sick individuals is a good indicator of its
reliability. Calculate the proportion of true positives
and negatives to evaluate the reliability of the test.
After doing the maths:
Accuracy = TP + TN /(TP + TN + FP + FN) (1)
Precision: The accuracy rate of a classification or
number of positive cases is known as precision.
Accuracy is determined by applying the following
formula:
Precision = TP/(TP + FP) (2)
Recall: The recall of a model is a measure of its
capacity to identify all occurrences of a relevant
machine learning class. A model's ability to detect
class instances is shown by percent of correctly
anticipated positive observations relative to total
positives.
Recall = TP/TP+FN (3)
F1-Score: A high F1 score indicates that a machine
learning model is accurate. Improving model
accuracy by integrating recall and precision. How
often a model gets a dataset prediction right is
measured by the accuracy statistic.
F1 Score = 2 / ( (1 / Precision) + (1 / Recall) ) (4)
F1 Score = (2 × Precision × Recall) / (Precision +
Recall) (5)
Upload dataset, View dataset,
Enter input data and
results pages are shown from figures 2-5 respectively.
Figure 2: Upload dataset.
Figure 3: View dataset.
Dietary Recommendation System Based on Machine Learning
281
Figure 4: Enter input data.
Figure 5: Results.
5 CONCLUSIONS
Customised diet plans could be radically altered by
AI-powered meal recommendation systems. Dietary
recommendations are generated by these systems
using decision trees, which take into account health
measures, dietary preferences, and medical issues.
When compared to more conventional methods, AI-
generated recommendations are superior for
managing chronic diseases like diabetes and
hypertension, as well as for ensuring patient
adherence. With the advancement of AI and real-time
data monitoring, these systems will be able to better
encourage healthy eating habits and provide improved
health outcomes.
6 FUTURE SCOPE
The diet recommendation system can be enhanced by
integrating wearable devices to track real-time health
metrics like heart rate, calorie expenditure, and
physical activity. Future developments may
incorporate deep learning models for improved
accuracy in dietary predictions and personalized
recipe generation based on user preferences, allergies,
and cultural habits. Adding voice assistant support can
make the system more interactive and user-friendly.
AI-powered food recognition technology can help
users monitor their daily food intake automatically.
Additionally, deploying the system as a mobile or
cloud-based application will improve accessibility,
allowing users to receive real-time diet
recommendations anytime, anywhere. These
advancements will make AI-driven nutrition planning
more precise, adaptive, and effective in promoting
long-term health and wellness.
REFERENCES
R. Kumar, S. Srivastava, & P. Tiwari, "Personalized Diet
Recommendation System Using Machine Learning,"
International Journal of Computer Science and
Information Security (IJCSIS), 2021.
P. Gupta, A. Sharma, & S. Verma, "A Machine Learning
Approach for Personalized Nutrition
Recommendation," Journal of Artificial Intelligence
Research, 2022.
A. Singh & P. Agarwal, "Dietary Pattern Prediction Using
Decision Tree Algorithm," International Conference on
Computational Intelligence and Data Science
(ICCIDS), 2020.
N. Ahmed, M. F. Khan, & A. Beg, "AI-based Diet Planning
for Diabetic Patients," IEEE Transactions on
Healthcare Informatics, 2019.
T. J. Theis & R. C. White, "Nutritional Recommendation
System Based on Deep Learning," Journal of Medical
Informatics and Decision Making, 2023.
Ian Goodfellow, Yoshua Bengio, & Aaron Courville,
"Deep Learning," MIT Press, 2016.
Christopher M. Bishop, "Pattern Recognition and Machine
Learning," Springer, 2006.
Trevor Hastie, Robert Tibshirani, & Jerome Friedman,
"The Elements of Statistical Learning: Data Mining,
Inference, and Prediction," Springer, 2017.
Géron Aurélien, "Hands-On Machine Learning with Scikit-
Learn, Keras, and TensorFlow," O'Reilly Media, 2019.
Tom Mitchell, "Machine Learning," McGraw-Hill, 1997.
Scikit-Learn Documentation, "Decision Trees in Machine
Learning," Available at: https://scikit-learn.org
TensorFlow Blog, "Building AI Models for Health and
Nutrition," Available at: https://blog.tensorflow.org
Kaggle, "Diet Recommendation System Dataset,"
Available at: https://www.kaggle.com
Harvard Health Publishing, "The Role of AI in Personalized
Nutrition," Available at:https://www.health.harvard.ed
u
Food and Nutrition Research Journal, "Dietary Data
Analysis with Machine Learning," Available at:
https://www.foodandnutritionjournal.com
ICRDICCT‘25 2025 - INTERNATIONAL CONFERENCE ON RESEARCH AND DEVELOPMENT IN INFORMATION,
COMMUNICATION, AND COMPUTING TECHNOLOGIES
282