# Personalization in Digital Ecomuseums: The Case of Pros-Eleusis
## 6 Recommender System
### Pros-Eleusis Recommendations as Graph Traversals
#### 6.2.2 Offline System Updates  
1. Creating SimilarWith edges between POIs  
In order to derive the similarity edges between the POI nodes in our graph, we turned to classification methods in the literature and, in particular, to k-nearest neighbor (KNN) techniques [24]. Using KNN in our method translates as follows: we are given two sets of POIs, A and B. Our system calculates the similarity between each POI in set A with each POI in set B by calculating their Cartesian product. This procedure takes place as a preprocessing step. The similarity measure is configurable and can be changed for a variety of other metrics. We chose this metric to be the cosine similarity, defined as follows:\[SimilarWith(POI_{a},\ POI_{b})=\frac{\sum_{\forall\ f\in F_{A}\cap F_{B}}POI_{a,f}* POI_{b,f}}{\sqrt{\sum_{\forall\ f\in F_{a}}POI_{a,f}^{2}\ *\ \sum_{\forall\ f\in F_{b}}POI_{b,f}^{2}}}\]  
\[iff\ SimilarWith(POI_{a},\ POI_{b})\geq threshold,0\ otherwise\]  
where \(F_{x}\) defines the set of all features of \(POI_{x},POI_{x}\in POI_{s}\), and \(POI_{x,f}\) defines the affinity value for feature \(f\) of \(POI_{x}\). We compute the similarities between POIs and combine them with known signs of user interest to estimate their interest in any POI in question. In addition, for the generated bipartite graph to remain relatively small and therefore easier to manage, similarities between POIs with a value less than a threshold are discarded. For experimental purposes, the threshold value was set to 0.1. Creating HasInterest edges between a user and a candidate POI  
When the system requests a recommendation for a user U and a POI P, this is internally translated as retrieving and composing known HasInterest and SimilarWith edges between U and a set of POIs (different from P) to create a path from U to P. This process results in a new, weighted HasInterest edge between U and P. This edge has two associated weights, namely strength and certainty, that are formally calculated as described in the following paragraph. Suppose we want to find the interest (i.e., a weighted HasInterest edge) of user U to a POI P. Moreover, suppose that P is associated with similarity edges with M other POIs, M \(\subseteq\) POIs. A subset N \(\subseteq\) M of these POIs are connected with HasInterest edges to the node representing U. The strength of the edge between \(U\) and \(P\) is calculated as follows [25]:  
\[strength(U,\ P)=\frac{\sum_{l_{k}}HasInterest(\underline{U,\ P_{i}})\ *\ SimilarWith(\underline{p_{i},\ P})}{\sum_{l_{k}}\ SimilarWith( \underline{p_{i},\ P})},\ P_{i}\
eq P,\ P_{i}\in POI_{s},\]  
where  
\[I_{k}=kmax_{similarity}(SimilarWith\cap HasInterest),\ k\ \leq 10,\ k\ \in\mathbb{N}\]  
\(SimilarWith=\{\ p_{j}\ |\ p_{j}\ \in POI_{s},\ p_{j}\ \text{is similar with }P\ \}\) and \(HasInterest=\{\ p_{k}\ |\ p_{k}\ \in POI_{s},\ U\text{ is interested in }p_{k}\ \}\)  
\[kmax_{similarity}\text{ is a function that returns the $POI_{s}$ of $SimilarWith\cap HasInterest$ with the highest degree of similarity}\]  
Additionally, we associate every HasInterest edge with a certainty value indicating the system confidence for the intensity of the predicted user interest. In the context of this method, this was chosen to be:  
\[certainty(U,\ P)=max_{certainty}(SimilarWith\cap HasInterest),\]  
If the user rated a specific POI, then the certainty is set to 0.5. In the case where the user dismisses the dialog box and essentially provides neutral feedback, certainty is set to 1. Top-k POI ranking  
Our system implements the described algorithm to estimate the interest in every POI in the knowledge base (KB) and rank them in descending order of user preference. This procedure combines the following steps:  
* Predict the user's interest (i.e., a weighted HasInterest (strength, certainty) edge) for every POI in KB that they have not yet visited. Visits are persistent across application runs. * Order results in a descending order of strength, using certainty to resolve ties.