# Ontology-Based Nutritional Recommender System
## 3 Recommender System Architecture
### Ontology of Dietary Recommendations  
To build the ontology, we used the iterative method proposed by [PERSON] and [PERSON] ([PERSON], 2012), which comprises several stages to specify the requirements, collect and analyze the data, and finally, construct the initial model. As a baseline, the FOKB ([PERSON] et al., 2016) was employed to structure the ODR. The following classes were preserved from the original schema: _Product_, which classifies ingredients by EAN (European Article Number); _FoodAllergies_, to express relations between food and allergen items; _Ingredients_, to define the building blocks of the recipes; and finally, _Measure_, which includes different rates to quantify indicators such as the Basal Metabolic Rate (BMR), the BMI, or Blood Pressure (BP), among others. For the purposes of our work, several elements were added to obtain the resulting ODR schema, namely _Person_, _Recipe_, and _Diets_. Next, the purpose of these added classes is described. _Person_: Axioms were included to define the most common variety of eating disorders that can affect users. There are several ways to determine whether an individual is suffering from this dietetic situation. A variety of measures can be considered to specify the grade of obesity. Depending on the measure obtained, the individual will be classified into a set of grades that go from 'Very Severely Underweight' to 'Obesity Type III'. In particular, for this work, the BMI was chosen to assess the grade of obesity because of its simplicity and low cost. In ([PERSON] and [PERSON] set the cutoffs to estimate the body fat. Concretely, for obesity type I, they estimated that the BMI must be between 30 kg/m\({}^{2}\) and 34.9 kg/m\({}^{2}\). Consequently, to express these cutoffs in the ontology, we defined the _has_bmi_ data property to declare the limits and various classes to represent the different types of obesity. For example, _Obesity_Type_I_ was defined as a class equivalent to _Person_ whose BMI is between the margins previously set. Following the same procedure, the following defined classes are declared:\(Normal\), \(Obesity\_Type\_I\), \(Obesity\_Type\_II\), \(Obesity\_Type\_III\), \(Overweight\), \(Underweight\), \(Severely\_Underweight\), and \(Very\_Severely\_Underweight\). Table 1 contains the semantic description of these defined classes. \begin{table}
\begin{tabular}{p{113.8 pt} p{227.6 pt}} \hline \hline _Very\_Severely\_Underweight_ & **Person** \\  & and (has\_bmi some **xsd:double**[\textless{} “15.0”\(\mathbf{_Diet_: This organizes the types of diets recommended by the system. At the moment, only the normal and hypocaloric diets (i.e., a diet that is low in calories) are defined since those are the ones associated with overweight/obesity problems representing one of the main challenges for dietitians and nutritionists. Eight subclasses were considered representing eight different hypocaloric diets (see Figure 2), namely _Alkaline_Diet_, _Artichoke_Diet_, _Atkins_Diet_, _Bland_Diet_, _Dissociated_Diet_, _Dunkan_Diet_, _Mediterranean_Diet_, and _Pineapple_Diet_. This is an initial set of diets chosen based on existing literature [50; 51; 52]. Some of these diets have been refuted by health experts given their relationship to nutritional deficiencies, but were included due to their popularity. Please bear in mind that this set of diets is dynamic and can be updated based on the latest scientific evidence. Each diet was systematically associated with a nutrition disorder that is related to users' metabolism rates. For example, in Figure 3, the axiom defined to link _Alkaline_Diet_ to _Overweight_ is depicted. Therefore, the recommendation engine will consider such an association when providing dietary suggestions to users depending on their health profile. _Recipe_: This contains the entire taxonomy of all the recipes included in the knowledge base.