An Efficient Recipe Recommendation Model for Healthcare Patients

DOI : 10.17577/IJERTCONV10IS08004

Download Full-Text PDF Cite this Publication

Text Only Version

An Efficient Recipe Recommendation Model for Healthcare Patients

Pooja Priyadarshni P S

B.Tech IT

Jeppiaar Engineering College

Dr. Sumathy G M.Tech (PhD) Associate Professor

Jeppiaar Engineering College

Preesha J

B.Tech IT

Jeppiaar Engineering College

Abstract:- The root cause of many diseases in this current century namely thyroid, PCOS, diabetes, ulcer etc. find its origin in our lifestyle. Our eating habits have a tremendous impact on our health. We are engaged in our jobs 24/7 and are fully focused on our career and financial growth and often forget to keep an eye on our diet. In this stressful and hectic lifestyle, we simply eat what we could cook in an instant. As a result, our body does not meet its essential nutritional requirements and this is where the problem slowly starts to evolve.

Especially working women, who needs the highest amount of nutrition to sustain in their activities, fail to fulfill a nutritious diet.

Our project aims to solve this daily crisis by building a recipe recommendation system. This system targets healthcare patients and people suffering from various diseases like thyroid, anemia and so on, by suggesting them various nutritious recipes which is based on certain factors like

  1. The disease that the person currently has

  2. The nutrition that they are focusing e.g., Zinc, Iron etc.

  3. The region that they belong.

  4. The type of recipe starters, main course, desserts etc.

Considering these aspects, our system recommends many nutritious recipes that matches the individuals health problems and their preferred nutrition and it also suggests recipes based on special festive occasions. This model also makes an analysis of the individuals daily nutrition intake and updates them on what could be improved to maintain their health.

Keywords – Food recommendation, Nutrition, Nutritional Value in Food, KNN


A Recommendation System acts as an effective and efficient solution for information overload and there are many recommendation research achievements been made from academia and industry. By dimming a binary relation between user-items, recommendation systems can help users find what they are interested in, and build personalized recommendations to meet their needs. Recent years, the term kitchen economics has risen up, and mobile apps for providing recipe information have gradually become the focus in our life. However, the rapid growth of mobile Internet services and media content will progressively exceed the adequate range of people. Another factor resulting from mobile information overload is, mobile devices have limitations in displaying, terminal handling, input or output capabilities, proving

that those which can be applied to traditional recommendation systems were not that effective to mobile recommendation systems, since it has higher requirements in User Mobility, Device Mobility and Wireless Access. In this paper, a scalable recommendation system based on python django is designed and implemented for personalized recipe recommendation for web apps. In this recipe recommendation system, we are also proposing a hybrid recommendation algorithm, which associates content-based filtering and collaborative filtering so as to improve the effectiveness of the recommended recipe. In the end, we evaluate the performance of the recommendation system.

People make decisions related to food every day. They all think about what to eat, where to eat, how much nutritional value this food has, can this make me lose weight, can this food make me healthy and other questions. These recipe recommendation systems helps the end user to take quick decisions in these intricate and ambiguous information spaces. Most of this attention is being focused on diet management systems getting paid highly, which has been replacing traditional doctor meet ups and paper-and-pen methods. These systems include informative content and services, which persuade users to alter their behavior. Due to the popularity of these diet monitoring facilities, these systems hold a vast amount of user preference information, which could be harnessed to personalize interactive features and to imporve engagement on the system and into the diet program. This recommender could exploit the nutritional values of the food to inform its recommendations.



      Existing research done on the current food recommender systems majorly play a vital role in aiding users to choose a diet which suits their personal interests and their underlying health conditions. All These studies make use of and exploit the necessary information based on user profiles and the existing recipes so as to generate food recommendations. It has been discovered that the quality of food recommendations would be strongly influenced by the accuracy and adequacy of user information as well as their required nutritional information of food. However, recent studies has not given such detailed discussions on this issue. In addition, although some papers (e.g., Ueta et

      al. 2011, Aberg 2006) propose food recommendations to tackle health problems, suggestions regarding changing eating behaviors, which are the premise to maintain a healthy lifestyle, are still missing. Explanations could help users gain more trust in recommendations and encourage them to follow good eating habits, however the inclusion of explanations into food recommendation systems has not received the interests from researchers. Besides, research on food recommender systems mainly focuses on single- user scenarios rather than on group scenarios. Until now, research on group recommender systems in the healthy food domain is very limited. Berkovsky and Freyne (2010) is one of the studies which proposes some aggregation strategies to generate food recommendations for groups of users. However, there still exist some open issues which should be taken into account within the scope of future work, such as achieving fast consensus within the group or fostering fairness among group members. existing solutions from the following three aspects, corresponding to each component of the proposed food recommendation framework: 1) incorporating context and knowledge for food recommendation, 2) personal model construction for food recommendation, 3) heterogeneous food analysis for food recommendation. In addition, considering the importance of nutrition and health in food recommendation, we therefore survey existing solutions on

      4) nutrition and health oriented food recommendation.


    In the proposed system we have used KNN for enhancing the nutrition food recommendation framework. KNN is used for sequential data processing. Here we used clustering optimization based KNN technique in order to make accurate recommendations based on certain attributes.

    In the healthy food domain, learning user tastes is recognized as a crucial prerequisite step in order to suggest dishes that users will like. All research discussed in this subsection aims for recommending food items or menus to individual users on the basis of exploring user tastes. Nowadays, unhealthy eating habits and imbalanced nutrition increase possibilities of people having obesity and other dietary-related conditions such as diabetes, hypertension, etc. As a preventive measure or treatment, dieticians and nutritionists usually suggests their patients to do regular exercises and design a special individualized meal plans for them. Unfortunately, not ll people have access to this feature to acquire an individualized meal plan due to their income and less time in their hands. That is where food recommender systems can be used as an intelligent nutrition consultation system. So in the proposed recommendation system User profile is created based on the inputs from the user like their medical history, nutrients they prefer, diet type, cuisine they prefer etc.users recent activity like rating and like to a particular food, and also recommendations based on similar user profiles.

    Fig. 1. Architecture Diagram

    We then achieve personalized food recommendations to each and every individual. Considering either user preferences or nutritional needs in an isolated fashion sometimes leads to suboptimal recommendations of food items. For example, if the recommendation system only takes account of user preferences, then the recommended foods would not be promised to be healthy. On the other hand, if we only consider nutritional needs then the generated recipe recommendation will not be attractive to users. Therefore, we need to consider both, user preferences and nutritional needs. This is a promising solution, since the end users will also receive more frequently relevant recipe recommendations, they become more attentive and more and more engaged in using them.


  1. Data Collection using Web Scraping

    Web scraping refers to the processes of raw data collection and parsing it from the web. We have some powerful web scraping tools in python in which we are making use of Beautiful Soup, a popular web scraping tool. Beautiful soup parses and scrapes out the content of HTML web pages. We send a HTTP request to the HTML page which contains our respective data then traverse through the HTML content to fetch the desired part. Then we put all the gathered data into a csv file.

  2. Data preprocessing

    Just like in every other Machine Learning processes, we are pre-processing our data set by removing the null values, filling the void values with statistical mean and so on.

  3. KNN Mapping

    We are now mapping both our datasets, one which contains recommended food for diseases and nutrition deficiencies and the other one containing all the recipes that we scraped from the web.

    After training the model with 80% data. It will be tested with remaining 20% test dataset. So whenever a new recipe data is introduced, now our model can predict which category it belongs to and add it to recommendations.

    Fig. 2. Before applying KNN

    KNN Algorithm uses Euclidean distance formula to calculate the K nearest neighbours. The formula is,

    d = [ (x22 x11)2 + (y22 y11)2]

    Fig. 3. After applying KNN

  4. Food recommendation

    After collecting all the necessary data from user through the website which we built using Django, now our model recommends recipes for the user based on their requirements and regional food availability.

  5. User Analysis

Finally, after the user selects their preferred recipes from the system of appropriate recipes, the system takes a note of all recipes and the nutrition present in them. Now a statistic analysis is demonstrated through visualization charts and graphs regarding the calories, Vitamins and minerals present in the chosen recipe for that day


[1] Giuseppe Agapito, Mariadelina Simeoni, Barbara Calabrese, Ilaria Caré, Theodora Lamprinoudi, Pietro H Guzzi, Arturo Pujia, Giorgio Fuiano, and Mario Cannataro. 2018. DIETOS: A dietary recommender

system for chronic diseases monitoring and management. Computer methods and programs in biomedicine 153 (2018), 93104

[2] Meng Chen, Xiaoyi Jia, Elizabeth Gorbonos, Chinh THong, Xiaohui Yu, and Yang Liu. 2019. Eating healthier: Exploring nutrition information for healthier recipe recommendations. Information Processing & Management (2019), 102051.

[3] What-To-Taste: A Food Recommendation System Kashish Ahuja, Mukul Goel, Sunil Sikka, Priyanka Makkar International Journal of Innovative Research in Computer Science & Technology (IJIRCST) ISSN: 2347-5552, Volume-8, Issue-3, May 2020

[4] Jignasha Dalal, Florentus Murzello A review: Recommendation system of Indian cuisine recipes using content-based approach

[5] Nutriflow: A Diet Recommendation System Mohan Shrimal Mohit Khavnekar

[6] Wireless Customizable Food Recommendation System Using Apriori and K-Means Algorithm Nilam Kadale* , Pranjali Bansod# , Reshma Pillai# , Shivangi Sane# , Snehal Pratape# , Swati Pawar# Volume V, Issue IV, April 2016 IJLTEMAS ISSN 2278 2540.

[7] Implementation of a personalized food recommendation system based on collaborative filtering and knapsack method Nattaporn Thongsri, Pattaraporn Warintarawej, Santi Chotkaew, Wanida Saetang International Journal of Electrical and Computer Engineering (IJECE) Vol. 12, No. 1, February 2022, pp. 630~638 ISSN: 2088-8708, DOI:


[8] Food Recommendation: Framework, Existing Solutions and Challenges Weiqing Min, Member, IEEE, Shuqiang Jiang, Senior Member, IEEE, Ramesh Jain, Fellow, IEEE IEEE TRANSACTIONS ON MULTIMEDIA

[9] A Food Recommender System Considering Nutritional Information and User Preferences RACIEL YERA TOLEDO1 , AHMAD A. ALZAHRANI2 , AND LUIS MARTíNEZ Received June 5, 2019,

accepted July 4, 2019, date of publication July 17, 2019, date of current version August 5, 2019. Digital Object Identifier 10.1109/ACCESS.2019.2929413

[10] A Systematic Review of Nutrition Recommendation Systems: With Focus on Technical Aspects Abhari S.1 , Safdari R.2 , Azadbakht L.3 , Lankarani K. B.4 * Niakan Kalhori Sh. R.5 , Honarvar B.6 , Abhari Kh.

[11] A Recipe Recommendation System Based on Automatic Nutrition Information Extraction Tsuguya Ueta1, Masashi Iwakami1, and Takayuki Ito1,2 1 Nagoya Institute of Technology, Gokiso-cho,

Showa-ku, Nagoya, Aichi, Japan

[12] A scalable recipe recommendation system for mobile application ZhengXian Li, Jinlong Hu* , Jiazhao Shen, Yong Xu 2016 3rd International Conference on Information Science and Control Engineering

[13] Y.-K. Ng and M. Jin, Personalized recipe recommendations for toddlers based on nutrient intake and food preferences, in Proceedings of the 9th International Conference on Management of Digital EcoSystems, 2017, pp. 243250.

[14] D. Ribeiro, J. Ribeiro, M. J. M. Vasconcelos, E. F. Vieira, and A. C. de Barros, Souschef: Improved meal recommender system for portuguese older adults, in Information and Communication Technologies for Ageing Well and e-Health. Springer International Publishing, 2018, pp. 107126.

[15] J. Chen and C.-W. Ngo, Deep-based ingredient recognition for cooking recipe retrieval, in Proceedings of the ACM on Multimedia Conference, 2016, pp. 3241.

[16] L. Gao, "A Product Recommendation Algorithm Based on Knapsack Optimization," in Eleventh Wuhan International Conference on e- Business (WHICEB), 2012.

[17] S. Vijh, D. Gaur, and S. Kumar, "Diet recommendation for hypertension patient on basis of nutrient using AHP and entropy," in 2020 10th International Conference on Cloud Computing, Data Science and Engineering (Confluence), 2020, pp. 364-368, doi: 10.1109/Confluence47617.2020.9057949

[18] D. R. Liu and Y. Y. Shih, "Hybrid approaches to product recommendation based on customer lifetime value and purchase preferences," Journal of Systems and Software, vol. 77, no. 2, pp. 181- 191, 2005, doi: 10.1016/j.jss.2004.08.031.