User:Sdjavadi/sandbox

= Location based recommendation = With the increasing use of smartphones that store and provide location information of the users, alongside appearance of location-based social networks (LBSN), like Foursquare, Gowalla, Swarm, Yelp, etc., a new realm of recommendation has been created. In addition of geosocial networking services, traditional online social networks such as Facebook and Twitter are using location information of their users to show and recommend more relevant upcoming events, posts, and local trends. Thus this information would be valuable for third-parties companies to advertise products, hotels, places or even forecast the number of taxis will be needed in a part of a city based on their location based on check-in s and previous patterns. Here, some applications and existing methods in location-based recommendation are provided.

Recommending new places
The main objective of recommending new places is to providing a suggestion to a user to visit unvisited places like restaurants, museums, national parks or any point of interest s. This type of recommendation is quite valuable especially for those are traveling to a new city and want to get 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 your previous check-ins and preferences but also using your social links and their check-ins to suggest a not-visited point-of-interest. The implicit goal of this type of recommendation is to lifting the burden of searching an interesting place for a user.

One of the first study in this area was conducted in 2011. The idea behind this work is to leveraging social influence as well as location influence to provide recommendations. Therefore, authors provide three types of scores $$Where $ s(u,i) $ denotes the probability of visiting place $ i $  by user $ 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 s(v,i) \over \sideset{}{_{v\in U}}\Sigma sim(u,v)} $$ $$Where $ F_u $ represent the set of friends and $ I_u $ is the place set of user $ u $ (places each user visited). The tuning parameter $ \eta $ which is between 0 and 1, controls importance of social similarity and visiting similarity of two users. $$ The aggregated score 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) $$
 * Similar users: this score is proportional to closeness of users that have the similar behaviors in visiting places. Mathematically, the mentioned 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} }
 * Similar friends: this score is calculated by the cosine similarity of users based on their mutual connections (friendships) in social media. This similarity is proportional to number of common friends that two user have in common. Formally 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|}
 * Geographical distance: This score is inversely proportion to the distance between the target place and the typical places that a user frequently visits. The authors in have shown that overall distribution of distances is similar to power-law distribution. The formula below calculate the probability of check-in user $ u $  in place $ i $  according to its distance from all check-ins of user $ u $ .$$ s_{geo}(u,i) = Pr(u,i) = \prod_{k \in I_u} f(distance(i,k))

Where corresponds to recommender systems based on user preference, social influence and geographical influence, respectively. Two weighting parameters $ \alpha $ and $ \beta $ $ (0 \leq(\alpha + \beta)\leq 1) $ denote the relative importance of social influence and geographical influence comparing to user preference.

Recommending the next place
Contrary to the previous section which is independent of the current location of the target user, recommending the next place is taking into account the current location, time, weather, reachability etc. before providing any suggestion. We can think of what would be the best place after having a visit of statue of liberty in new york harbor? Or what this a best bar to go after going to the cinema on the weekend in your hometown? This type of recommendation which is generally known as context-aware recommendation, tend to provide places that other people (possibly your friends) checked in after they have checked-in to the current place of the target user.

Recommending events and neighborhoods
Every day there are thousands social events happening in different parts of town. Detecting and recommending those events that would be interesting to a user, is an intriguing task which requires having a profile of user's event preferences whether based on his own history or his social circles' activities. In this section, some two similar task of event and neighborhood recommendation in the urban areas are presented.

Social Events
As authors in discuss the most important challenge in social event detection is to provide a reliable fine-grained dataset of previous attendance of users. They have used user mobile data to estimate their residence area and attended events. Here, 6 different strategies designed and tested for event recommendation are provided. $$Where $ n_{i,j} $ represents number of individuals living in neighborhood $ i $  attended event $ e $. The similarity measure is weighted by $ N_i $ and $ N_k $  which represents the number of events people living in neighborhoods $ i $  and $ k $  have attended. Similarly, $ N_{i\cup k} $ represents number of users living in $ i $ or users living in $ k $. Having similarity of neighborhoods, one can predict the score of user $ i $ to an event $ j $  based on similarity-weighted average of the similar locations' values:$$ score_{i,j} ={\sideset{}{_k}\Sigma n_{k,j} \times sim(j,k) \over \sideset{}{_k}\Sigma sim(i,k)} $$So, one can predict the scores of each pair-events and recommend those events to those users that have got the highest values. $$
 * Popular events: the most attended event be recommended
 * Geographically close events: recommending events that are close to user's residency area. The score of an event could be computed as inverse distance to that event.
 * Popular events in area: similar to first strategy but limited to a certain neighborhoods.
 * TF-IDF: inspired by the popular approach in information retrieval, events are recommended that are not necessarily popular in general but are very popular in a local area.
 * The K-nearest locations: First areas that are similar to the residence area of a user is detected. The similarity between two neighborhoods $ i $ and $ k $  could be defined as$$ sim(i,k) ={\sideset{}{_e}\Sigma (n_{i,e} \cdot   n_{k,e}) \over \sqrt{\sideset{}{_e}\Sigma (n^2_{i,e})}\sqrt{\sideset{}{_e}\Sigma (n^2_{k,e})} } {2N_{i\cup k} \over N_i + N_k}
 * The K-nearest events: unlike previous strategy, here we can compute the similarity of events and recommend top K-events that are similar to those that a user have enjoyed.$$ score_{i,j} ={\sideset{}{_q}\Sigma n_{i,q} \times sim(j,q) \over \sideset{}{_q}\Sigma sim(i,k)}

Neighborhoods
In, authors provide interactive tool name HoodSquare which essentially uses 5-month, Foursquare check-ins data to group similar areas together to redraw neighborhood boundaries of a city. Their analysis reveal different characteristics of a city which could be exploited for different tasks such as attractive neighborhood recommendation for tourists and city residences. Similarly, Livehood project was conducted in order to define new local regions, named Livehood, partition a citiy in the way that could reflect the character of life in that areas.