# A Novel Hybrid Recommender System for the Tourism Domain
## 3 Content-Based Recommender Component
### Constructing a User Profile for Content-Based Recommendations  
The first process executed by our algorithm is the construction of the user profile. For this purpose, we use two different components, namely the _Show Generic Images_ and _Build User Profile_ components. Ninety (90) _generic images_ (or, _generic POIs_) are also stored  
Figure 4: Part of the constructed POIs’ hierarchy tree. G1, H1, C1 and S1 are leave-nodes corresponding to specific POIs.  
Figure 3: The algorithmic engine of the CB Recommender.  
in our database, and are each related to a specific category of POIs. In other words, these _generic POIs_ are pictures that illustrate POIs which are not contained to the database, and, importantly, are represented only by the first 12 features which demonstrate the _character_ of the _generic POI_ depicted in them.  
The hierarchy tree we utilize in our algorithm is asymmetrical, i.e., it can have an arbitrary number of children per node, and all branches may have different length. Generic POIs and actual POIs are inserted as leaves in the tree structure, lying under its layer that contains 90 nodes corresponding to the 90 different POI categories. Although every generic image, corresponding as it does to a specific category of POIs, lies on a specific leaf of the hierarchy tree, actual POIs may lie on more than one leaf. As mentioned earlier, in Figure 4 we visualize a snapshot of the POIs' hierarchy structure, generated by real-world data containing specific examples of POIs and categories. Namely, G1 is a gallery and C1 is a cocktail bar, connected to the categories \"Gallery\" and \"Cocktail Bar\" respectively. We should highlight that the percentage of POIs and generic images related to \"Leisure\" is 80%, while those related to \"Culture\" belong to the other 20%. Those proportions are derived from the responses of actual tourists that participated in the aforementioned survey.  
The _Show Generic Images_ part of our algorithmic engine depicted in Figure 3 is responsible for selecting randomly and presenting to the user only 15 (The choice of presenting to the user \"15\" generic images was made since, as [34] indicates, completing a survey with 15 questions requires five to seven minutes only, while pressing a \"like\" or \"dislike\" indicator on an image is arguably much faster than responding to a question. In practice, experimentation with our real-world app shows that a real user \"likes\" or \"dislikes\" the 15 images presented to her within 45 s) out of 90 _generic images_ preserving the proportion of leisure and cultural generic POIs. Subsequently, these 15 _generic images_ are imported to the _Build User Profile_. Based on [27], we adopt an elicitation process in which the user either \"likes\" or \"dislikes\" each of the aforementioned 15 _generic images_ that are presented to her in sequence, resulting in the generation of the _user profile vector_. Notably, the user is allowed to terminate this process at any time (i.e., she does not have to interact with all 15 images).  
To build the _user profile_, we act as follows. In accordance with the work of ref. [8], we represent the _user profile_ as a _vector_ containing the first 12 features of the POIs in our dataset--that is, the features which demonstrate the _character_ of a POI. We then populate this vector with values as follows: We first construct the set of all generic images that the user has \"liked\"--let this set be denoted as \(u_{L}\). Then, for each one of the 12 \"character features\", we calculate the average of its values in the \(u_{L}\) set of \"liked\" generic images and insert this average as the value of the corresponding element in the _user profile vector_.