## 3 Model Design
### Encounter Probability and Social Relationship Decomposition
#### 3.2.3 Decomposition Method  
We represent the probability of encounter and social relationship values between the nodes described above in a matrix. Wherein, let \(M=\{m_{ij}\}\) denote the matrix of \(n\times n\); that is, the encounter probability matrix. For a pair of nodes, \(n_{i}\) and \(n_{j}\), \(m_{ij}\in[0,1]\) denote the historical encounter probability of node \(i\) to node \(j\). Let \(S=\{s_{ij}\}\) denote the social relationship matrix of \(n\times n\). Two nodes with strong social relationships affect each other's probability of encountering the same node. We also believe that nodes are more willing to be close to the nodes with high social relations. Because the devices in the opportunistic network are mostly carried by people, it is significant to analyze the probability of node encounters through the social relations of nodes. It is assumed that node, \(n_{a}\), knows nothing about a node, \(n_{c}\), and it meets node, \(n_{b}\), and node, \(n_{c}\), with a high relation value of node, \(n_{a}\). So, node, \(n_{a}\), meets it because it is close to node, \(n_{b}\), and then node, \(n_{a}\), and node, \(n_{c}\), also meet. From the above analysis, we can summarize the above social process as:  
\[\widetilde{M}_{ij}=\frac{\sum\limits_{z\in\kappa(i)}M_{zj}S_{iz}}{|\kappa(i)|} \tag{6}\]  
where \(\widetilde{M}_{ij}\) is the prediction of the probability that user \(u_{i}\) meets user \(u_{j}\), \(M_{ij}\) is the probability that user \(u_{i}\) meets user \(u_{j}\), \(\kappa(i)\) is the neighbor's set that user \(u_{i}\) relations and \(|\kappa(i)|\) is the number of related users of user \(u_{i}\) in the set, \(\kappa(i)\). \(|\kappa(i)|\) can be merged into \(S_{ij}\), since it is the normalization term of the relation evaluation of the estimate. Then, we can infer the prediction of the probability that user \(u_{i}\) for all users is as follows:  
\[\left( \begin{array}{c}\widetilde{M}_{11}\\ \widetilde{M}_{22}\\ \vdots\\ \widetilde{M}_{in}\end{array} \right)=\left( \begin{array}{cccc}S_{i1}&S_{i2}& \cdots&S_{in}\end{array} \right)\left( \begin{array}{cccc}M_{11}&M_{12}& \cdots&M_{1n}\\ M_{21}&M_{22}&\cdots&M_{2n}\\ \vdots&\vdots&\ddots&\vdots\\ M_{n1}&M_{n2}&\cdots&M_{mn}\end{array} \right) \tag{7}\]  
Consequently, for all users, we can infer as:  
\[\widetilde{M}=M^{T}S \tag{8}\]  
where \(SM\) can be interpreted as the probability forecasting purely based on the user relevance. The idea of the probability matrix decomposition is to derive the \(l\)-dimensional features of the high-quality representative node (or user), \(N\), of the node (or user) based on the analysis of the probability values of the encounter between the nodes. Let \(N\in M^{l\times n}\) and \(X\in M^{l\times n}\) be the latent nodes and social factors. The feature matrix, the column vectors, \(N_{i}\) and \(X_{j}\), represent the potential feature vectors of the node and social factor, respectively. We define the conditional distribution of the observed encounter probability as:  
\[p(M|N,X,S,\sigma_{M}^{2})=\prod\limits_{i=1}^{n}\prod\limits_{j=1}^{n}\mathcal{ N}\left[(m_{ij}|g(\sum\limits_{z\in\kappa(i)}S_{iz}N_{z}^{T}X_{j}),\sigma_{M}^{2} )\right]^{\text{I}_{ij}^{M}} \tag{9}\]  
where \(\mathcal{N}(x|u,\sigma^{2})\) is the probability density function of the Gaussian distribution with a mean of \(u\) and a variance of \(\sigma^{2}\), and \(I_{ij}^{M}\) is an exponential function. If node \(i\) meets node \(j\), it is equal to 1, otherwise it is equal to 0. The function, \(g(x)=1/(1+\exp(-x))\), is a logarithmic function, which allows the function value corresponding to \(N_{i}^{T}X_{j}\) to fall in the interval \([0,1]\).