LAU-SOE

 

PIN framework for Intelligent Nutrition Health Assessment & Meal Planning

Download prototype demo

George Salloum, Elie Semaan, and Joe Tekli
SOE, Dept. of Electrical & Computer Eng.
Lebanese American University
36 Byblos, Lebanon
george.salloum01@lau.edu, elie.semaan@lau.edu, joe.tekli@lau.edu.lb

    I. Introduction

    At present, establishing a healthy lifestyle has become a very important aspect in people's lives. One of the main requirements of maintaining a healthy lifestyle is a healthy nutrition. Thus, people reach out for a nutrition expert's services, to help achieve this healthy lifestyle requirement. Yet a few obstacles come to mind: i) the cost of seeking an expert's help which is recurring and non-trivial, ii) the need to attend regular meetings with the expert which might not be always practical, and iii) the need for readily accessible health services which might be difficult to provide by a human expert. To solve these issues, we design and develop an framework titled PIN (Personal Intelligent Nutritionist) that automates the services offered by a nutrition expert, namely: i) providing patients seeking nutrition advice with an assessment regarding her nutrition-health state: whether they should gain, lose, or maintain their weight (based on mutiple nutrition-health measurements), and then ii) providing them with daily meal plans to meet their optimal nutrition-health state (considering all categories of required nutrients). To achieve this, our solution consists of two main modules: i) a health state assessor agent specially designed using the fuzzy logic paradigm to evaluate the health state of the user based on various inputs (age, sex, height, weight, and body fat percentage (BFP)), and recommend a target weight and BFP for the user while considering her level of activity and the rate at which the weight change is desired (the agent's final output is the daily caloric intake required to reach the target weight); and ii) a meal plan generator agent, designed based on an adaptation of the transportation optimization problem to simulate the "human thought process" involved in generating daily meal plans (based on the health state assessor's output).

    II. System Architecture

    Our solution aims at automating the health assessment and meal plan recommendation services offered by a nutrition expert. The general architecture of our solution is shown in Fig. 1. It consists of two main modules: i) the Health State Assessor (HSA), and ii) the Meal Plean Generator (MPG). HSA consists of three main agents designed using the fuzzy logic paradigm to simulate the “human common sense” thought process involved in nutrition health assessment and recommendation; i) Weight Assessment and Recommendation (WAR) agent: evaluates the weight state of a patient based on various inputs (age, gender, height, weight, and BFP) and then recommends a target BFP and weight, ii) Caloric Intake and Exercise Recommendation (CIER) agent: estimates Caloric Intake (CI) and exercise recommendations based on the physical activity level of the patient and the patient's target BFP and weight produced by the WAR agent, and iii) Progress Evaluation and Recommendation Adjustment (PERA) agent: monitors and evaluates the progress of the patient toward the target BFP and weight, and adjusts the CI and exercise recommendations when required (i.e., when the patient is not making the expected progress). PERA is specifically important since patients' bodies do not always evolve regularly or the same way, even when following the same nutrition recommendations. CIER and PERA 's recommendations are provided as input to the MPG module to perform meal plan generation. The MPG module is designed based on an adaptation of the transportation optimization problem to simulate the “human thought process” involved in generating daily meal plans. It consists of five main components: (i) macronutrients calculator : computes the amount of macronutrients (i.e., carbohydrates, protein, and fat) to fulfil the required caloric intake, (ii) servings calculator: computes the daily amount of servings for each of the six primary food categories (i.e., starch, fruits, milk, vegetables, lean meat, and fats) to fulfil the required macronutrients, (iii) servings assignor : splits the servings for each of the six primary food categories over the five daily meals (i.e., breakfast, snack one, lunch, snack two, dinner) based on sample meal plan serving assignments, (iv) food assignor allocates the foods to the five daily meals while meeting all the serving requirements and considering the patient's preferences, and (v) meal plan evaluator : computes the relevance score for every generated meal plan highlighting its compliance with patient preferences.

    The user interacts with the prototype system using two interfaces dedicated to both the HSA and MPG modules. Initially the user interacts with the HSA module to undergo an assessment and determine her/his destination weight and BFP. Once the assessment is completed, the user would then interact with the MPG module, choosing food preferences through a dedicated controller, before the system starts generating meal plans. Note that the user can also interact with both agents at any time and any order to re-assess her/his health state and/or generate new plans.

    Fig. 1. Overall PIN architecture

    III. Implementation and Tests

    We implemented our prototype system as a light-weight android (mobile) application, using methods of the jFuzzyLogic open source library [1, 2] in implementing our fuzzy logic HSA agent and developing our own implementation of the transportation problem to build our MPG agent. On the server-side, we adopt a three-layer architecture consisting of: (i) a Web API layer that allows client-side applications to communicate with the server to request data and services; (ii) a Business Logic layer where PIN 's main decision making processes are implemented; and (iii) a Data Access layer where data storage and retrieval take place. Every layer is internally designed in a modular way to allow for separate testing and evaluation of every module. We used the SPRING framework [3] to build the Web API, and Hibernate [4] and the Object Relationship Mapper [5] to build the data access layer. Angular 6 was used the develop the client-side Web application, where communication between the client-side and server-side applications is established through REST API over HTTP. We have empirically tested the different components of our system, namely: i) the similarity between destination weights and BFPs suggested by HSA agent compared with the nutrition experts' recommendations, ii) the correctness of the recommendations of the HSA agent, as well as iii) the correctness of the meal plans generated by the MPG agent. A large battery of experiments invovling 50 real-case patient profiles and 11 nutrition expert evaluators highlight the effectiveness and efficiency of the solution, in both nutrition assessment and meal planning tasks, producing results which are on a par with and sometimes surpass those of human nutritionists.

    The prototype system and experimental results can be downloaded from the following links:

    This study is partly funded by the National Council for Scientific Research (CNRS-L) - Lebanon, and by LAU.

    References

    1. Cingolani P. & Alcalá-Fdez J. (Accessed 2020), jFuzzyLogic: a Java Library to Design Fuzzy Logic Controllers According to the Standard for Fuzzy Control Programming. Sourceforge, Available: http://jfuzzylogic.sourceforge.net/html/index.html
    2. Cingolani P. & Alcala-Fdez J. (2012), jFuzzyLogic: a Robust and Flexible Fuzzy-Logic Inference System Language Implementation , IEEE Inter. Conf. on Fuzzy Systems (FUZZ-IEEE), pp. 61-75.
    3. VMware Inc. (Accessed 2020). Available: https://spring.io/docs
    4. Hibernate ORM (Accessed 2020). Available: http://hibernate.org/orm/documentation/5.3/
    5. O'Neil E. J. (2008). Object/Relational Mapping 2008. In Proceedings of the 2008 ACM SIGMOD International Conference on Management of Data (SIGMOD '08), p. 1351