# Event-Based Probabilistic Embedding for POI Recommendation
## 2 Topic And Region Embedding
### Embedding of Events  
Users' time preferences and category preferences often interact with each other. For example, people who like midnight activities often like to go to the bar. To this end, we explore the interaction between time preferences and category preferences through the hidden variable topic \(z\). Technically, each topic \(z\) in our model is not only associated with a multinomial distribution \(\theta_{w|z}\) over categories of POIs but also related with a multinomial distribution over a POI's identifier \(\theta_{w|r,z}\) and a check-in time \(\theta_{t|r,z}\). Users liking a topic \(z\) indicates that the time preference and category preference corresponding to topic \(z\) are in line with the users' preference. So, we use a user's distribution \(\theta_{z|u}\) of interest on a set of topics to simulate a user's interest in topic \(z\). In addition, we use the hidden variable region \(r\) to explore the interaction between time preference and geographical preference. Unlike [PERSON] et al. (2019), we use two hidden variables (topic \(z\) and region \(r\)) instead of just one hidden variable, because using two hidden variables has the following advantages. Firstly, the use of two hidden variables can better explain the meaning of the model. The two hidden variables, respectively, represent the geographical regions and semantic topics. Second, using two hidden variables can make the model perform better with the same number of free variables. Similar to topic \(z\), each region \(r\) is associated with a multinomial distribution over the POI's identifier \(\theta_{v|r,z}\), a check-in time \(\theta_{t|r,z}\) and a Gaussian distribution \(N(\mu_{r},\Sigma_{r})\). Then, we use \(N\) distributions \(\theta_{r|u}\) to represent each user's preference for \(r\). Finally, we model the user decision process as shown in Algorithm 1, and the time complexity of Algorithm 1 is \(O(|D_{u}|*|W_{v}|)\). ```
1:for each \(D_{u}\) in D do
2:for the each check-in record (\(u\), \(v\), \(l_{v}\), \(W_{v}\), \(t\)) in \(D_{u}\)do
3: Draw a topic index \(z\sim\) Multi (\(\theta_{z|u}\))
4: Draw a region index \(r\sim\) Multi (\(\theta_{r|u}\))
5: Draw a POI \(v\sim\) Multi (\(\theta_{v|r,z}\))
6: Draw a time \(t\sim\) Multi (\(\theta_{t|r,z}\))
7:for each word \(w\in W_{v}\)do
8: Draw \(w\sim\) Multi (\(\theta_{w|z}\))
9:endfor
10: Draw a location \(l_{v}\sim N\) (\(\mu_{r},\Sigma_{r}\))
11:endfor
12:endfor
```  
**Algorithm 1** Modeling user decision process. To incorporate the check-in time information to the topic discovery process, we employ the widely adopted discretization method by ([PERSON] et al., 2019) to split a day into hourly-based slots. The joint probability is characterized by \(P(u,v,l_{v},W_{v},t,z,r)\) as follows. \[P(u,v,l_{v},W_{v},t_{q},z,r)=\theta_{z|u}^{(z)}\theta_{r|u}^{(r)}\theta_{t|r, z}^{(q)}\theta_{v|r,z}^{(v)}p(l_{v}|\mu_{r},\Sigma_{r})\prod_{w_{v}\in W_{v}} \theta_{w|z}^{w_{v}} \tag{1}\] \begin{table}
\begin{tabular}{c c} \hline \hline
**Abbreviation** & **Full Name** \\ \hline LBSNs & Location-Based Social Networks \\ \hline POIs & Point Of Interests \\ \hline MF & Matrix Factorization \\ \hline SGD & Stochastic Gradient Descent \\ \hline PSSG & Projected Scaled Sub-Gradient \\ \hline TARE & Topic And Region Embedding \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The abbreviation and full name of concepts. where \(\theta^{i}_{z|u}\) is the probability that user \(u\) generates topic \(i\), \(\theta^{i}_{r|u}\) is the probability that user \(u\) generates region \(i\), \(\theta^{i}_{t|r,z}\) is the probability that region \(r\) and topic \(z\) jointly generate time \(i\), \(\theta^{i}_{v|r,z}\) is the probability that region \(r\) and topic \(z\) jointly generate POI \(i\) and \(\theta^{w_{i}}_{w|z}\) is the probability that topic \(z\) generates word \(w_{i}\). The probability that POI \(v\) appears in region \(r\) is characterized by \(P(l_{v}|\mu_{r},\Sigma)\) as follows.