# A Novel Hybrid Recommender System for the Tourism Domain
## 4 A Hybrid Recommender System
### Content-Based Recommendations  
Subsequently, our proposed system proceeds with our _content-based (CB) recommendation_ technique. In particular, our system employs the _hybrid_ similarity measure (_Hybrid SMRR_) discussed earlier, in order to produce the final set of personalized recommendations. We remind the reader that, via this hybrid measure, our algorithmic engine combines _XWP_ similarity, (i.e., the hierarchy similarity measure employed in the _Hierarchy SMbR_ sub-component in Figure 6--see Section 3.2), and our _Weighted Extended Jaccard Similarity (WEJS)_ index (i.e., a non-hierarchy similarity measure employed in the _Hybrid_ SMbR component in Figure 6--see Section 3.3), to generate recommendations that best match the user preferences.  
Figure 7 depicts the _CB recommender component_ of the _Hybrid RS_. Notice that this figure is almost identical to Figure 5, with two changes: First, the _Hierarchy SMbR_ sub-component is now not allowed to produce final recommendations (the blue _Normalization Process_ and its output are now removed), but only provides input to the _Hybrid SMRR_ sub-component.  
This is since our experiments in Section 5 point to the _Hybrid SMbR_ being a better choice (than solely _Hierarchy SMbR_) for a _CB recommender_ component of our final _Hybrid RS_. The second change is that \(\mu_{u}\) replaces the _user profile vector_ as input in the _WEJS_ metric, since our (hybrid) _CB recommender_ is now combined with the Bayesian elicitation module that produces a user profile in the form of a \(\mathcal{N}(\mu_{u},\Sigma_{u})\) multivariate Gaussian distribution.  
The implementation of the overall _Hybrid recommendations process_ is summarized in Algorithm 2 below. The algorithm begins with the _Bayesian Inference_ process, which produces the set \(u_{L}\) and the distribution \(\mathcal{N}(\mu_{u},\Sigma_{u})\) describing the derived user profile. It proceeds with the generation of \(u_{M}^{X}\) sets by employing _XWP_ similarity between the \(u_{L}\) set and the POIs in our dataset (see line 7 in Algorithm 2). Subsequently, one POI is sampled out from each \(u_{M}\) set via the _Normalization & Sampling to Output_ component, and is provided as input to the _WEJS_ measure along with the \(\mu_{u}\) (see line 12 in Algorithm 2). Finally, for each selected POI a (new) \(u_{M^{\prime}}^{S}\) set is created, and all such sets are concatenated (see line 13 in Algorithm 2) in order to derive the final recommendations.  
```
1:\(u_{L},\mathcal{N}(\mu_{u},\Sigma_{u})\leftarrow\) Bayesian Inference
2:POIs\(\leftarrow\) all POIs with their 56 features
3:for each generic image in \(u_{L}\)do
4:\(X\leftarrow\) generic image
5:for each POI in POIs do
6:\(Y\leftarrow\) POI
7:\(u_{M}^{X}\gets u_{M}^{X}\cup is\_XWP\_similar?\left(X,Y,\text{POIs}^{\prime}\right)\)
8:Single POI\(\leftarrow\) Normalization_and_Sampling_to_Output (\(u_{M}^{X}\))
9:\(S\leftarrow\) Single POI
10:for each POI in POIs do
11:\(Y\leftarrow\) POI
12:\(u_{M^{\prime}}^{S}\gets u_{M^{\prime}}^{S}\cup is\_WEJS\_similar?\left(S,Y,\, \mu_{u}\right)\)
13: Recommendations \(\leftarrow\) Recommendations \(\cup\)\(u_{M^{\prime}}^{S}\)
14:20 Recommended POIs\(\leftarrow\) Normalization (Recommendations)
```  
**Algorithm 2** Hybrid Recommender Algorithm