# An Empirical Recommendation Framework to Support Location-Based Services +
## 4 Methodology
### Recommendation Generation  
In this section, we describe two types of recommendation generation, one is for a single user, and the other one is for a group of user. Algorithm 3 summerizes the first calculation. As we have the user's interest profile generated by DBSCAN and collaborative filtering (CF), for recommendation generation we measure the user's current location (cartesian co-ordinate) and also extract all the surrounding POIs. Using the grid structure all extracted POIs are sorted into a list already shown in Table 7, which also allows us to find a better choice of the area of recommendations. Then we calculate the similarity score between the person's priority and extracted POIs using the cosine similarity coefficient shown by Formula (2). Here, vector A and B defines the frequency values of user profile and the extracted POIs respectively. We also calculate the Manhattan distance between the user and the location of POI to provide the shortest path. The highest value of \(FinalScore\) defines the suggested POI and also in case of same type of POIs, we consider with higher rating of that place. \begin{table}
\begin{tabular}{c c l} \hline \hline
**Grid No** & **Grid Location** & **POI List** \\ \hline
1 & (1,1) & [Store] \\
2 & (1,2) & [Store] \\
3 & (1,3) & [Food, Food, Shopping, Recreation] \\
4 & (1,4) & [Food] \\
5 & (2,1) & [Shopping] \\
6 & (2,2) & [Food, Store] \\
7 & (2,3) & [Shopping, Store] \\
8 & (2,4) & [Shopping] \\
9 & (3,1) & [Food] \\
10 & (3,4) & [Traveling] \\ \hline \hline \end{tabular}
\end{table} 
Table 8: POI list into Grids. Figure 4: POIs into a Grid Map. Consider a user location marked by a red pin shown in Figure 5. Now we extract all the POIs around the user and plot it grid-wise. Then we take a specific area defined by the user to make the recommendations marked by the circle. We also make a list of POIs from the grids that are within the range of the circle to measure the similarities. Thus, we can reduce the number of calculations by avoiding the grids which stay outside of the circle. As we do not have to consider all the POIs of all grids, it also minimizes the processing time. For example, there are eight grids \(grid_{2}\), \(grid_{3}\), \(grid_{6}\), \(grid_{7}\), \(grids\), \(grid_{10}\), \(grid_{11}\), and \(grid_{12}\) for the user and if the priority profile defines the 'Restaurant' category, then there remain only 4 grids \(grid_{2}\), \(grid_{3}\), \(grid_{6}\), and \(grid_{7}\) to recommend. since we have to offer the shortest possible distance, so the system suggests the 'Restaurant' on the same grid \(grid_{7}\) with the user. To recommend a group of users, at first we match the similarity of interest between the user's profile to find the best matching interest for all users using Formula (2) and make a list of that for further matching. Then we calculate the centroid location (cartesian co-ordinate) of the users so that the suggested place can be a minimum distance from all the users of the group. We extract all POIs at the centroid location using the grid structure and make a list of it. Finally, we calculate the similarity between user priority and extracted POIs to measure the \(FinalScore\) and identify the suggestions. We also consider the rating of each location to make the recommendation more perfect. For this Algorithm 4 is given below. Figure 5: Recommendation for a Single User.