# A Novel Hybrid Recommender System for the Tourism Domain
## 4 A Hybrid Recommender System
### Bayesian Inference of the User Profile  
Initially, when a user enters our _Hybrid RS_ for the first time, the preference elicitation process--i.e., the _Bayesian Inference_ component in Figure 6)--initiates. We chose to adopt an iterative picture-based elicitation process that presents to the user a set of \(n\) generic images, each of which illustrates a specific type of POI, in order to derive information regarding her interests. Subsequently, the user selects the image which is most relevant to her interests and provides a rating for each image on a 10-level Likert scale, where 10 represents the situation where the image matches perfectly with her preferences. Note that a detailed description of this process can be found in [11]. After each iteration, our system exploits the provided rating of the selected generic image and draws a specific number of samples from its distribution. The number of samples ranges form 40 to 500 depending on the user's rating. Intuitively, the user's rating and the logistic function [37] are utilized with the aim of computing the precise number of samples  
In more detail, a high rating provided by the user for a generic image represents high similarity between the distributions of the image and the user, while a small rating means that this image does not match completely with her preferences. As such, more samples should be drawn in the case of the high rating resulting to the construction of a better model based on the user's interests. Subsequently, once our algorithm has computed the exact number of samples that should be drawn, it performs a Bayesian Inference procedure [8; 11] in order to update its belief regarding the interests of the user. In particular, we chose to employ the Normal-Inverse Wishart (NIW) distribution which is a multivariate four-parameter family of continuous probability distributions, while it retains the property of _conjugacy_ of a multivariate Gaussian distribution where the mean and covariance matrix  
Figure 6: The algorithmic engine of the proposed Hybrid RS. are unknown. Generally, a closed form for the computation of the posterior distribution is provided by the usage of conjugate priors, resulting in a computationally efficient Bayesian updating procedure. Formally, the update procedure of the prior hyperparameters--\(\kappa_{0}\), \(\mu_{0}\) (the mean vector), \(v_{0}\) (degrees of freedom) and \(\Psi_{0}\) (the precision matrix)-- is performed by drawing samples directly from the observed data to obtain the posterior ones, as follows:  
\[\mu_{n}=\frac{\kappa_{0}}{\kappa_{0}+n}\cdot\mu_{0}+\frac{n}{\kappa_{0}+n}\cdot\bar {x} \tag{5}\]  
\[\kappa_{n}=\kappa_{0}+n \tag{6}\]  
\[v_{n}=v_{0}+n \tag{7}\]  
\[\Psi_{n}=\Psi_{0}+S+\frac{\kappa_{0}\cdot n}{\kappa_{0}+n}\cdot(\bar{x}-\mu_{0 })\cdot(\bar{x}-\mu_{0})^{T} \tag{8}\]  
\[S=\sum_{i=1}^{n}(x_{i}-\bar{x})\cdot(x_{i}-\bar{x})^{T} \tag{9}\]  
where \(n\) is the number of samples, \(x_{i}\) are the drawn samples provided by the data, \(\bar{x}\) represents the sample mean and \(S\) is the scatter matrix. \[\Sigma\sim IW(\Psi_{n},v_{n}) \tag{10}\]  
\[\mu\mid\Sigma\sim N(\mu_{n},\Sigma/\kappa_{n}) \tag{11}\]  
Thus, our algorithm can generate a normal distribution representing the user preferences at any given time: after \(m\) iterations our system has constructed a multivariate normal distribution that represents the preferences of user \(u\), denoted as \(\mathcal{N}(\mu_{u},\Sigma_{u})\), where \(\mu_{u}\) and \(\Sigma_{u}\) are the mean vector and the covariance matrix of the generated distribution, respectively. Additionally, our system stores the selected image from each iteration in order to exploit such information in the _CB recommendations_ stage of the hybrid approach. As such, during the elicitation process, we create a set, denoted as \(u_{L}\), which contains the images that the user selected in each iteration.