Keywords

1 Introduction

Nowadays, it is widely accepted that many of modern lifestyle habits such as diet and exercise, together with genetics, play an important role in the development of many diseases such as cardiovascular diseases, diabetes, cancer, obesity and so on. Thanks to the great advances in genetics in recent years, nutritional genomics science has emerged to personalize diet, at individual level, based on the particular needs of each person. The concept of personalized diet has become very popular in the recent years. Although there is no complete knowledge yet about all the effects of nutrients on all existing organisms, personalized menus can significantly contribute to the maintenance of healthy lifestyles and prevention. The project Diet4You aims at building a personalized menu planner that recommends a specific menu depending on the person and his/her personal characteristics and context. Diet4You is an Intelligent Decision Support System providing strategies to achieve an optimal diet at individual level. The system takes into account the nutritional goals to be achieved, the characteristics of the person and his/her health status and context, which includes habits of the individual and his/her food preferences as well. Through a complex combination of Knowledge Engineering, Case-Based Reasoning (CBR), and Data Analysis based on advanced data mining techniques, the system proposes nutritional plans, by recommending the nutritional characteristics of the convenient diet for a certain person and for a certain period of time. It uses previous learnt successful experiences and knowledge extracted from previous databases or provided directly by experts. In a second phase, a proposal of complete menus for the full nutritional plan prescribed (either by the system itself or the nutritionist) and for the full target period will be elaborated, taking into account the desired restrictions and expected effects given by the nutritionist, as well as the food preferences of the individual.

The paper is structured as follows: Sect. 2 outlines the related work, Sect. 3 describes an overview of the Diet4You project, and the formalization of a basic nutritional plan is described in Sect. 4. In Sect. 5, the innovative components of Diet4You and their interaction are explained. Section 6 describes an example of application, and finally in Sect. 7 some conclusions and future work are outlined.

2 Related Work

The system deployed within the Diet4You project is an Intelligent Decision Support System, which proposes a personalized nutritional plan for a concrete person in a determined period of time. It integrates nutrigenomic knowledge, health expert knowledge, ontologies and food databases, and a historical experiential knowledge, including cultural context, as well as the data related to the individual at different levels. Currently, there is not a well-established methodology to design a complete nutritional plan simultaneously taking into account nutrition, genetics, metabolism of people, health considerations, life style habits, cultural context and personal preferences Some nutritional applications have been deployed in the literature like The Automatic Meal Planner - Eat This Much [1], which is an automatic menu planner that given a number of Kcal, it prepares a menu trying to maintain the proportions of macronutrients. Even respecting the specifications of the final diet for an isolated meal, it does not take into account the special characteristics of the person. The USDA (United States Department of Agriculture) offers an application for health professionals to compute the DRIs (Dietary Reference Intake) based on the person’s gender, age, height, weight, and physical activity [2]. There are other systems that allow creating a menu interactively, such as the application Menu planner, created by NHL organization [3] where a person can manually combine dishes. This system does not control the balance of the final diet. It only indicates the total amount of Kcal, carbohydrates and fat that the menu contains. From the 70’s [10] the field of Decision Support Systems (DSS) is responsible for the generation of software that can analyse data and provide answers to pertinent and relevant questions in decision making of a specific organization. By the late 90s, Intelligent Decision Support Systems (IDSS) [12] begin to include specific domain knowledge and the ability of automatic reasoning. Research to establish a stable infrastructure to the rapid development of IDSS [15] is intense, but there are still many open challenges. However, it seems clear that the IDSS have to combine data-driven models, analytical models, model-driven techniques, specific domain knowledge and some capacity of reasoning to provide a relevant end-user support [14]. Although some efforts have been done to determine a general purpose architecture for IDSS [5], we are still far from general IDSS frameworks for real systems, and specific IDSS should be built for each particular application. One of the main components of an IDSS is the use of data-driven decision methods, which may include methods from the data mining (DM) field, both ma-chine learning or multivariate statistics methods [8]. These modules explore the available data to extract the information that will become knowledge for the sup-port of the posterior decisions. On the other hand, several model-driven techniques, like expert-based models are integrated in IDSS to get more reliable systems for supporting the end users.

As it has been said, the present proposal aims to use advanced semantic comparisons [7], reasoning and statistics to catch the complex structure of the target data, for supporting further decision-making for successful dietary interventions. The proposed IDSS browses the data contained in food databases containing prepared dishes to build nutritional plans according to nutritional prescriptions. This system encompasses several components, some data-driven, some knowledge-driven and some based on a Case-Based Reasoning (CBR) approach. CBR is a methodology that simulates the natural reasoning model of human beings, reasoning by analogy, to solve new problems using similar previous experiences [11]. This is a stable and efficient methodology that has been used in many applications and domains. CBR has been used in the construction of menus such as in the systems MIKAS [9] or CAMPER [13], using this later system rules as well.

Fig. 1.
figure 1

Flowchart of the Diet4You system

3 Overview of Diet4You

As depicted in Fig. 1, the Diet4You system is composed of two main blocks:

  1. 1.

    A Nutritional Plan Generator (NPG). This part of the system is designed to return a nutritional plan given personal specifications. The generator receives the following pieces of information as input:

    • Dietary profiles that can be prescribed to certain types of persons with certain genetic characteristics and lifestyle habits, and the pattern of expected diet effects in those scenarios.

    • Expert knowledge including Daily Reference Intakes (DRIs) of micronutrients and trace elements; the Recommended Daily Allowance (RDA) of macronutrients; and nutritional and institutional recommendations, such as those provided by the OMS.

    • History of Nutritional Plans, which contains a case base made of all the personalized nutritional plans generated by the system in past experiences and feed the CBR that builds the nutritional plans. The nutritional plan may be accompanied by the nutritionist’s evaluation of the outcome observed in past applications of the plan.

    • Characteristics of the person who wants to follow a nutritional plan. This means standard information of the health status of the person including biometrics and biochemical characteristics. Also, drugs intakes, medical history including current, past, and risk factors. Context data such as socio-demographic and habits such as tobacco, alcohol, physical exercise and diet. It can include genetic information when available.

    With all these inputs the NPG provides a recommended nutritional plan for a given person to be followed along a certain period.

  2. 2.

    Personalized Menu Planner (PMP). Given a nutritional plan, either coming from the previous subsystem or directly provided by a nutritionist, this subsystem search on food databases for the menus better combining to fit the target nutritional plan. The result is a personalized menu for a given period of time. In Diet4You project, this system is also based on CBR. The system retrieves and adapts dishes to be included in the menu until it is considered that the plan is satisfied. This subsystem includes several components as well:

    • Cultural styles: Is a knowledge-based component that can manage the different cultural eating styles regarding how meals distribute along day (Mediterranean, British, ...)

    • Restrictions: Is a knowledge-based component that permits nutritionists to express nutritional restrictions (like no sugars for diabetic patients), specific allergies of the person that cannot be included in the proposal of dishes of the recommended nutritional plan

    • Preferences: Including user limitations based on personal criteria that will be taken into account as far as possible, trying to avoid proposed menus containing the ingredients excluded by the user.

Thus, the Diet4You system is composed of two subsystems NPG and PMP both combined to give the person guidelines on how to eat for a certain period of time to achieve certain given goals (reduce cholesterol, feed better, improve healthy lifestyle, etc.).

4 Formalization of the Nutritional Plan

A nutritional plan contains the specification of the proportions of families of foods to be taken during a certain period of time. A nutritional plan is defined as the triplet:

$$\begin{aligned} \mathcal {N}={<}F,T,Q{>} \end{aligned}$$

where,

  • F = (\({\pi }_{1}\), ..., \({\pi }_{N}\)) is a vector containing the recommended balance of food families to be taken along a certain period of time.

  • \(\pi _{f,f\in \{1:N\}}\) is the proportion of food family \({F}_{f}\) recommended, such that (\(\sum _{f=1:N}\pi _{f}=1\)), given a set of N foods families \({\mathcal {F}} = \{{F}_{1}, \ldots ,{F}_{N}\}\) (i.e., fruits, proteins, etc.)

  • \(T=[t_{0},t_{f}]\) is the period of time where the diet must be followed

  • Q indicates the total quantity of food in Kcal to be intaken along the whole diet.

The quantity Q is needed due to the fact that food proportions are different for children, young or elderly people.

5 Innovative Components of Diet4You

The goal of PMP system is to search in a background database, entitled Food Proportion Data Base (FPDB), a combination of food and dishes appropriate for breakfast, lunch or dinner that fits Q in a time period T and balanced according to F distribution. The system retrieves from FPDB (the reference food database used as background in Diet4You) the dishes whose global composition aggregates to the balance of foods prescribed in the nutritional plan. Indeed, every single dish might contain more or less percentage of a certain food family than the one specified in the nutritional plan. Thus, the possible menus generated at this step propose combinations of the different family of foods in the proportion specified by the nutritional plan, structured in several prepared dishes (like roasted chicken or cheesecake).

5.1 Hard Nutritional Restrictions Management

The Personalized Menu Planner must deal with additional restrictions to be satisfied by the final recommendation. Restrictions specify that some foods or families are not allowed for a certain person. According to health conditions due to medical reasons, the nutritionist may impose some restrictions in the design of the menu. For example, for diabetic patients, avoiding sugars, or refined flours might be mandatory, as avoiding saturated fats might be mandatory for persons with cholesterol.

In addition, known allergies of the person, like some nuts in determined people, can be managed as well by declaring the ingredients that must be avoided in the proposed menu.

Finally, some cultural features of the person, like avoiding meat for a vegetarian person, avoiding pork meat for a Muslim, can be managed as well, by using same mechanisms.

Diet4You is behaving very respectfully with all kinds of hard restriction and guarantees that the proposed menu will not include a single dish containing restricted ingredients or food families. This strategy is implemented by filtering the food database and building the personalized menu over the remaining dishes.

5.2 User Preferences

Another interesting feature of the system is the management of the user preferences. A user preference expresses that a person likes or dislikes some kind of food. For example, some person could dislike the fish or the chicken. The system takes into account the negative preferences declared by the person, by minimizing the probability that dishes containing these ingredients are selected for the PMP component to compose the final menu. In this case there is no guarantee that the disliked food is completely eliminated from the dishes in the proposed menu, because the final DRIs of the food must be ensured, but the dishes containing these ingredients will be avoided as much as possible in the solution. This will be internally managed by introducing penalization of associated dishes.

5.3 Cultural Eating Styles

There is a cultural factor in the nutrition habits of a person according to where the person lives. For instance, in a Mediterranean country, the breakfast usually contains calories and few proteins, the lunch is usually basically concentrating proteins, and the dinner has less proteins and more vegetables or fruits. However, a person living in an Anglo-Saxon-style country, will have more proteinous breakfast, a light lunch with vegetables and not much calories, and finally a dinner with more proteins.

The nutritional plan is divided into sub-plans for each one of the meals during a day: breakfast, lunch and dinner in Mediterranean or Anglo-Saxon styles, but it could contain 5 or 2 meals a day according to the cultural context. The percentages of family foods in each sub-plan concentrate the nutrients in particular sub-plans according to the cultural habits definition. The personal menu planer is optimized at the local level of each sub-plan and the whole resulting menu fits the global nutritional plan originally prescribed.

5.4 Personal Menu Planner

The personal menu planner (PMP) is mainly implemented following the cycle of Case-Based Reasoning.

Given a nutritional plan for a certain individual \({i}: {\nu }_{i} = {<}{F}_{i}, {T}_{i}, {Q}_{i}{>}\), and considering that the F\(_{i}\) vector contains the N families of food resulting from a certain level of granularity determined in the reference food ontology:

  1. 1.

    Pre-processing step. Pre-process the DB in order that all food families have equivalent units in Kcal, the standard unit most commonly used to specify diets. Usually, the database uses different measurement units for each food family like Kcal for sugars or grams for vegetables. Equivalences are first of all used to transform the database into vectors of proportions of Kcal per food family and the quantity of a portion in Kcal as well. Thus, all \(p_{{d_{f}}}\) will express the proportion of Kcal. From now on, we will refer to this transformed data base as Food Proportions Data Base (FPDB). The FPDB contains a set of prepared dishes or simple foods, with the quantities considered as a standard portion and their decomposition in F families. FPDB provides the following information of a given dish d:

    • \(p_{d}=(p_{{d_{1}}},\ldots ,p_{{d_{N}}})\) where \(p_{{d_{f}}}\) is the proportion of food family F\(_{f}\) contained in one standard portion of dish d (f = 1:N).

    • q\(_{d}\) is the quantity associated to one standard portion of dish d, in grams or cups or the corresponding measurement unit.

  2. 2.

    Retrieval step. After the previous step, \({p}_{d}\) is a vector of proportions and thus, it is directly comparable with \({F}_{i}\). Determine a suitable distance for comparison. Since both are vectors of proportions, the Euclidean distance is suitable to that purpose. Use the FPDB as the case base to identify candidate dishes with their corresponding p\(_{d}\) close to F\(_{i}\) required in the nutritional plan. Sort the elements in FPDB into \(FPDB^{*}=\left\{ d_{\left( k\right) }\right| d_{\left( k\right) }\in FPDB\wedge d(p_{{d_{\left( k\right) }}},F_{i})\le d(p_{{d_{\left( k+1\right) }}},F_{i})\). Candidates will be in the first positions of \(FPDB^{*}\).

  3. 3.

    Reuse step. Implement the reuse step of CBR by adapting the candidate solutions contained in \(FPDB^{*}\) to the recommendation to be presented to the end-user in form of complete menus for the period T\(_{i}\). As a first trial, a simple version of this mechanism is presented, building complete menus for T\(_{i}\) = 1, i.e., a single day, as a first step to the general solution where larger periods will be considered. Solving the problem along one single day, the extension to several days is not difficult. Q\(_{i}\) is the total quantity of kcal to be ingested during T\(_{i}\). Given the candidate solutions d \({\in }\) \(FPDB^{*}\), it will hold that \({q}_{d} < {Q}_{i}\) and some adaptation strategy is required to combine the first elements in \(FPDB^{*}\) in such a way that S (the resulting solution menu) contains the first elements in \(FPDB^{*}\) and \(\sum _{\forall d\in S}q_{d}=Q_{i}\). Elaboration of menus requires no repetition of dishes along same day. For achieving this goal an iterative process of retrieving and adapting is computed until the nutritional plan is satisfied. At each iteration, the candidate solutions d \({\in }\) \(FPDB^{*}\) are sequentially included in the menu, and the corresponding q\(_{d}\) are subtracted from the Q\(_{i}\) associated to the nutritional plan. The plan is satisfied when card(S) is such that the \(Q_{i}-\sum _{\forall d\in S}q_{d}\) is minimum. In previous works [16, 17] three strategies were proposed: the Single Candidates Generation (SCG), the iterative Candidates Generation (ICG) and the Decomposed Nutritional Plans (DNP), which is a refinement of iCG. From the preliminary evaluation of all strategies, the iCG strategy obtained the best results, and hence, it is the one used.

The iCG strategy retrieves d and updates \({F}_{\!i}\) and \({Q}_{i}\) at every iteration according to the quantities of food families consumed with the selected dish d incorporated into the menu and it re-computes \(FPDB^{*}\) accordingly before subsequent iteration. The process is as follows:

  1. 1.

    Include the first dish d from \(FPDB^{*}\) into the resulting menu S.

  2. 2.

    Compute \({E} = {Q}_{i}- q_{d}\).

  3. 3.

    if \({E \ge } 0\), eliminate d from \(FPDB^{*}\), update \({Q}_{i}= {E}\), and compute the quantity of food families corresponding to one portion of \({d}: ({q}_{1} \ldots q_{N})\), being \({q}_{f} = {q}_{d}{\times }p_{{d_{f}}}\), compute the quantities of food families required in the nutritional plan (\({Q}_{1}{...Q}_{N}\)), with \({Q}_{f} = {Q}_{i} {\times } \pi _{{f_{i}}}\), build the residual quantities: (\({R}_{1}{...R}_{N}\)), with \({R}_{f} = {Q}_{f}{-} q_{f}\), and update \({F}_{\!i}\) with \(F_{\!{f_{i}}}=R_{f}/Q_{i}\), recompute \(FPDB^{*}\) and repeat (go to step 1).

  4. 4.

    If \(E < 0\), reduce the portion of d to be included into the menu: \({q}_{d} = {Q}_{i}\) and stop.

5.5 Human and Artificial Intelligence Components Interaction

The system Diet4You currently provides an interaction of several components and elements originated from the interplay between humans and artificial intelligence. In the proposed system, the knowledge and cognitive reasoning from nutritionists is provided for the specification of the nutritional plan, the hard nutritional restrictions, and the different cultural eating styles.

On the other hand, the end user of the system provides his/her personal soft constraints, i.e., preferences, for some type of foods, that the system will try to satisfy as much as possible in the final configured menu.

The reasoning process takes into account this interplay, and it is implemented by the menu planner. The menu planner is using a cognitive approach resembling the human reasoning in an artificial system by mimicking the analogical reasoning of humans. Similar menu plans are retrieved from the case base (collection of experienced menus), and then are adapted to fit the personalized menu according to the preferences and cultural eating styles of the final user. The sub-plan manager combines the information from the different sub-plans (for each meal of the day) to generate the final menu plan for a full day.

6 An Example of Application

Currently, the FNDDS and FPED databases offered by USDA [18] are used as the source knowledge for the nutritional prescription, as it was in the previous work [16, 17]. FPED (Food Patterns Equivalents Database) [4] is a DB that maps the food and drinks of the FNDDS into 38 food patterns indicating the corresponding recommended quantity of each pattern. In these 38 food patterns, there are 8 main patterns and the rest are subdivisions so as to facilitate detailed data analysis.

Fig. 2.
figure 2

Food family ontology

This classification into food families (see Fig. 2) is used as the reference ontology to group foods and dishes from a nutritional point of view. The \({\mathcal {F}}\) set of food families, is determined from the reference ontology, by selecting the appropriate horizontal cut of the concepts network. In this work, experts suggested to consider the first level categories shown in Fig. 2 and \({\mathcal {F}}\) = {Fruit, Vegetables, Grains, Proteins, Dairy, Fats, Sugars}. Alcohol is discarded as it is considered in a non-healthy diet.

A pre-processing step, including some reasoning on the food ontology, is needed in order to specify all the measurements in the same unit and impute missing recommended quantities (see more details in [16, 17]). In this case, the selected unit to express total energy of a dish is Kcal. After that, the foods are transformed into proportion of Kcal per each food family, becoming the Food Proportion Database (FPDB). The quantities and energy associated to a portion of each food or dish to be included in the menu are provided from FNDDS database. Let \({\mathcal {F}}\) = {Vegetables, Fruit, Grains, Proteins, Dairy, Fats, Sugars} be the reference food families extracted from the food ontology. Four nutritional plans and two types of restrictions are used. The first plan Nutritionist is a general nutritional plan defined by an expert of nutrition. Other plans come from an adaptation of the data presented by National Geographic [6] regarding data from FAO (Food and Agriculture Organization of United Nations). The plans, World, Spain and USA represent the mean of what the world, Spain and USA citizens eat daily. The four plans are shown in Table 1.

Table 1. Average balance of food families in standard diets of different countries

For each nutritional plan, the distribution of food families is provided and column Q(Kcal) contains the quantity of Kcal of the plan. The time is omitted because all plans represents one day. To show how the restrictions affects to the recommended diets, 2 sets of restrictions are created (see Table 2). The crosses indicate the active restrictions.

Table 2. Two sets of restrictions
Table 3. Generated menus by the application of the nutritional plans with different sets of restrictions and different cultural eating styles

Note that the restrictions can be defined in any food family even if they are from different granularity and a restriction of a food family directly affects all its subfamilies. The first set of restrictions called diabetic contains restrictions for persons that have problems related with insulin in their metabolism and they need to restrict the raise of glucose in blood. Therefore, the restriction is affecting the added sugars food family and the resulting recommendations limits the foods with high level of sugar (added sugars), simple carbohydrates as the refined grains and saturated fats represented in the solid fats family. The second set represents a personal choice related with both a life style and cultural issues like being vegetarian and therefore, the menu cannot contain any animal product: protein and dairy are the most affected food families. In protein family, those subfamilies that refer to an animal source are restricted (meat, poultry, organ, seafood, cured meat and eggs).

Table 3 shows the twelve generated menus for the four nutritional plans using the different restrictions and the different cultural eating styles. This table contains the dishes and foods recommended by PMP listed together with their quantity equivalent to a portion of the dish to be included into the menu, expressed in grams. For each complete menu suggested by the system, the total Kcal and percentages of whole diet are shown. First column represents the recommended menus when no restrictions are applied and the second and third using the diabetic and vegetarian restrictions.

The recommended menus for diabetics have in common more proteins from poultry, fish, legumes and vegetables while with no restrictions the presence of fish and legumes was practically non-existent. The vegetarian menus have an increment of beans and nuts as protein source. The nutritionist plan is quite rich in protein and the resulting menu without restrictions is plenty of meat. When the restrictions are included, in the diabetic case where the solid fats are restricted, the meat is substituted by fish and in the vegetarian case are substituted with legumes, and meat-substitute types. The vegetarian from the USA plan is plenty of cereal bars containing cereals, sugars and fats that are the main percentages of food families.

7 Conclusions

In this work, we have introduced the user preferences, and the cultural eating styles components, which modify the usual operation of the menu planner. To implement the cultural. Eating styles, the different plans are sliced in sub-plans, which are optimised according to the cultural eating styles, which means that the different type of food are distributed in a particular and cultural way.

In addition, the system takes into account the negative preferences declared by the person, by minimizing the probability that dishes containing these ingredients are selected for the PMP component to compose the final menu.

Through the preliminary evaluation with the nutritionists, it seems that the results of the system are quite accurate and provide reasonable nutritional plans which satisfies the different constraints and other personal characteristics.

To the best of our knowledge the current Diet4You systems is the first complete system integrating all these restrictions, user preferences, and cultural eating styles in the recommendation of personalized nutritional plans in the literature.

One the future lines of the work will be the integration of profile nutritional plans defined by the nutritionists in the system. The nutritional profiles are defined upon profile-diets which have been identified through the application of previous data-driven components.