## 3 Similarity Analysis Approach
### Benchmark for Similarity Analysis  
The existing work for the similarity analysis uses longitudinal wireless activity sessions to build a mobile user's spatiotemporal profile [5]. The representation of spatiotemporal preferences in the form of an association matrix can be changed to use each column for a building (where the collection of access points represents a building) and the time granularity can be changed to represent hourly, weekly, or monthly behaviors. In the existing work, each row represents the day in the traces and the column represents the access point. After that, it calculates the SVD (singular value decomposition) of each associate matrix. The SVD of a given matrix \(A\) can be represented as a product of three matrices: an orthogonal matrix \(U\), a diagonal matrix \(S\), and the transpose of an orthogonal matrix \(V\). It is written as  
\[A=U.S.V^{t} \tag{5}\]  
After that, a mobile encounter index metric is represented \(M_{ei}\), which indicates the similarity ranking (i.e., 0 represents totally dissimilar and 1 indicates exactly the same) between two objectives' mobility preferences by quantitatively measuring the similarity between the eigenvectors of their mobility matrices. For the pair of objectives, with respective eigenvectors as \(A=a_{1},a_{2},a_{3},\ldots,a_{ar}\), and \(B=b_{1},b_{2},b_{3}\ldots,b_{rb}\), the mobility similarity can be calculated by the weighted sum of the pairwise inner product of their eigenvectors as  
\[M_{ei}(A,B)=S_{AB}=\sum_{i=1}^{RanKA}\sum_{i=j}^{RankB}W_{ai}W_{bj}|A_{i}B_{j}| \tag{6}\]  
where \(M_{ai}(A,B)\) is a quantitative measure index that shows the closeness of two mobile peers in their mobility preferences in the time-space dimension. \(S_{A,B}\) is an index that shows the closeness of users in terms of the values in their co-occurrence matrix. Here, \(A\) and \(B\) are the respective eigenvectors of the users. \(W_{ai}\) and \(W_{bj}\) are the numbers of co-occurrences of users \(A\) and \(B\) at specific locations. Co-occurrence is measured in terms of time, location, and device information.  
The similarity analysis shows that the value of the similarity is within the range of \(0\leq S_{A,B}\leq 1\). The lower similarity rank indicates that peers have very different time-space mobility preferences. In other words, they have fewer opportunities to meet each other somewhere. Otherwise, for the higher similarity-ranked cases, the user pairs have similar mobility preferences, or they have high probabilities to meet each other in some locations where they have the same interests to visit. In addition, we can also quantify how the mobility preferences similarity between the same pair of moving objectives varies with time. Firstly, we can calculate the similarity between two mobile objectives, e.g., \(A\) and \(B\), at two points in time, \(M_{ci}(A,B)_{T1}\) and \(M_{ci}(A,B)_{T2}\), where \(T\) represents a specific time instance. We perform this calculation on all user pairs and investigate the relationship between the users' location and time. We calculated the MCC (mobility correlation coefficient) of the similarity matrices obtained after a \(T\) interval as  
\[M_{cc}=\frac{\sum_{A,B}(X-\bar{X})(Y-\bar{Y})}{NS_{x}S_{y}} \tag{7}\]  
where \(X=S_{A,B}(T1)\), \(Y=S_{A,B}(T2)\), and the notations \(\bar{X}\) and \(S_{X}\) denote the average and standard deviation of \(X\), respectively. \(N\) is the total number of mobile user pairs. The mobility correlation coefficient indicates how stable the interactions between the peer pairs are. It has been reported that the similarity metrics between objective pairs correlate reasonably well if the considered periods are not far apart.