# Location-based recommendation

Location-based recommendation is a recommender system that incorporates location information, such as that from a mobile device, into algorithms to attempt to provide more-relevant recommendations to users. This could include recommendations for restaurants, museums, or other points of interest or events near the user's location.
These services take advantage of the increasing use of smartphones that store and provide the location information of their users alongside location-based social networks (LBSN), like Foursquare, Gowalla, Swarm, and Yelp. In addition to geosocial networking services, traditional online social networks such as Facebook and Twitter are using the location information of their users to show and recommend upcoming events, posts, and local trends.
In addition to its value for users, this information is valuable for third-party companies to advertise products, hotels, places, and to forecast service demand such as the number of taxis needed in a part of a city.

## Background

Recommender systems are information filtering systems which attempt to predict the rating or preference that a user would give, based on ratings that similar users gave and ratings that the user gave on previous occasions. These systems have become increasingly popular and are used for movies, music, news, books, research articles, search queries, social tags, and products in general.

## Recommending new places

The main objective of recommending new places is to provide a suggestion to a user to visit unvisited places like restaurants, museums, national parks or other points of interest. This type of recommendation is quite valuable, especially for those who are traveling to a new city and want the best experience during their trip. Location-based social networks or third-party advertising companies are willing to provide a recommendation not only based on previous check-ins and preferences but also using social links to suggest a not-visited point-of-interest. The implicit goal of this type of recommendation is to lift the user's burden of searching for an interesting place.
One of the first studies in this area was conducted in 2011. The idea behind this work was to leverage social influence and location influence and provide recommendations. The authors provide three types of scores:
* Similar users: this score is proportional to the similarity in behavior of users for visiting places. Mathematically, the similarity score between two users is computed as follows:$sim_{usage}(u,v)={\sideset{_{j\in I}}\Sigma s(u,j)\times s(v,j) \over {\sqrt {\sideset{_{j\in I}}\Sigma (s(u,j))^{2}}}{\sqrt {\sideset{_{j\in I}}\Sigma (s(v,j))^{2}}}}$Where s(u, i){\textstyle s(u, i)} denotes the probability of visiting place i{\textstyle i} by user u{\textstyle u}. This value could be computed based on the idea of user-based collaborative filtering as below:$s(u,i)={\sideset{_{v\in U}}\Sigma sim(u,v)\times sim(v,i) \over \sideset{_{v\in U}}\Sigma sim(u,v)}$
* Similar friends: this score is calculated by the cosine similarity of users based on their mutual connections (i.e.: friendships) in social media. This similarity is proportional to the number of friends that two users have in common. It is calculated as:$sim_{social}(u,v)={\eta \cdot |F_{u}\cap F_{v}| \over |F_{u}\cup F_{v}|}+{(1-\eta )\cdot |I_{u}\cap I_{v}| \over |I_{u}\cup I_{v}|}$Where F$_u${\textstyle F_{u}}represent the set of friends and I$_u${\textstyle I_{u}}is the place set of user u{\textstyle u} (i.e.: places the user visited). The tuning parameter η{\textstyle \eta }, which is between 0 and 1, controls importance of social similarity and visiting similarity of two users.
* Geographical distance: This score is inversely proportional to the distance between the target place and the typical places that a user frequently visits. Other studies have shown that overall distribution of distances is similar to power-law distribution. The formula below calculates the probability of check-in for user u{\textstyle u} in place i{\textstyle i} according to its distance from all check-ins of user u{\textstyle u}.$s_{geo}(u,i)=Pr(u,i)=\prod _{k\in I_{u}}f(distance(i,k))$
The aggregate of these three scores is defined as:$S(u,i)=(1-\alpha -\beta )sim_{usage}(u,i)+\alpha \cdot sim_{social}+\beta s_{geo}(u,i)$Where the three terms correspond to recommender systems based on user preference, social influence and geographical influence, respectively. The two weighting parameters α{\textstyle \alpha } and β{\textstyle \beta } (0≤(α+β)≤1){\textstyle (0\leq (\alpha +\beta )\leq 1)} denote the relative importance of social influence and geographical influence compared to user preference.

## Recommending the next place

Providing a sequence of recommendations becomes increasingly complex, and must take into account each location, the time, weather, reachability, etc., before providing any suggestion. These are generally known as context-aware recommendations, and tend to provide places that other people (possibly the user's friends) visited following an initial visit to the location of the user's first recommendation.

## Recommending events and neighborhoods

There are a vast number of temporary events being held in different locations. Detecting and recommending events that would be interesting to a user is a task which requires considerable profiling, both of the user's history of event preferences and those of the user's social circle.

### Social events

Researchers at a 2010 Institute of Electrical and Electronics Engineers (IEEE) conference discussed the need of a reliable fine-grained dataset of previous user-attendance in order to provide social-event detection. User residence area and attended events were estimated from user mobile data. Six different strategies were designed and tested for event recommendation:
* Popular events: the most-attended event.
* Geographically close events: events close to user's residency area. The raw score of an event could be adjusted by a factor inversely proportional to the distance to the event.
* Popular events in area: the most-attended events within certain neighborhoods.
* TF-IDF (term frequency–inverse document frequency): inspired by the popular approach in information retrieval, recommends events which may not be widely popular but are very popular within a local area.
* The K-nearest locations: popular events in neighborhoods similar to the user's residence area. The similarity between two neighborhoods i{\textstyle i} and k{\textstyle k} could be defined as:$sim(i,k)={\sideset{_{e}}\Sigma (n_{i,e}\cdot n_{k,e}) \over {\sqrt {\sideset{_{e}}\Sigma (n_{i,e}^{2})}}{\sqrt {\sideset{_{e}}\Sigma (n_{k,e}^{2})}}}{2N_{i\cup k} \over N_{i}+N_{k}}$where n$_{i, j}${\textstyle n_{i, j}} represents number of individuals living in neighborhood i{\textstyle i} who attended event e{\textstyle e}. The similarity measure is weighted by N$_i${\textstyle N_{i}} and N$_k${\textstyle N_{k}} which represent the number of events people living in neighborhoods i{\textstyle i} and k{\textstyle k} have attended. Similarly, N$_{i∪k}${\textstyle N_{i\cup k}}represents number of users living in i{\textstyle i} or users living in k{\textstyle k}. Having similarity of neighborhoods, one can predict the score of user i{\textstyle i} to an event j{\textstyle j} based on a similarity-weighted average of the similar locations' values:$score_{i,j}={\sideset{_{k}}\Sigma n_{k,j}\times sim(i,k) \over \sideset{_{k}}\Sigma sim(i,k)}$The scores of each pair-events can be predicted and those events recommended to users with the highest values.
* The K-nearest events: the similarity of events is computed and top K-events are recommended that are similar to those that a user previously enjoyed.$score_{i,j}={\sideset{_{q}}\Sigma n_{i,q}\times sim(j,q) \over \sideset{_{q}}\Sigma sim(j,q)}$