# Social Recommendation Based on Quantified Trust and User's Primary Preference Space
## 6 Experiments and Validations
### Evaluation Metrics and Comparison Methods  
We adopt four representative metrics as evaluation criteria for the recommended performance: root mean square error (\(RMSE\)), accuracy (\(Precision\)), recall rate (\(Recall\)) and \(FI\) value. Each evaluation metrics is calculated as follows.  
The root mean square error (\(RMSE\)) is defined as:  
\[RMSE=\sqrt{\frac{\sum_{(u,i)\in R_{test}}(r_{ui}-r_{ui})}{|R_{test}|}} \tag{18}\]  
where \(R_{test}\) denotes the set of ratings in the testing set, and \(|R_{test}|\) is the size \(R_{test}\). The \(Precision\), \(Recall\), and \(F1\) value are defined as:  
\[Precision=\frac{1}{n}\sum_{i=1}m\frac{|Rec(i)\cap Far(i)|}{|Rec|}. \tag{19}\]  
\[Recall=\frac{1}{n}\sum_{i=1}m\frac{|Rec(i)\cap Far(i)|}{|Fav|}. \tag{20}\]  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Statics** & **Epinions** & **FilmTrust** & **Douban** & **Ciao** \\ \hline Users & 49,289 & 1508 & 129,490 & 7375 \\ Items & 139,738 & 2071 & 58,541 & 99,746 \\ Ratings & 664,823 & 35,497 & 16,830,939 & 280,391 \\ Density1 & 0.01\% & 1.14\% & 0.22\% & 0.04\% \\ Social Relations & 487,183 & 1853 & 1,711,780 & 111,781 \\ Density2 & 0.02\% & 0.08\% & 0.01\% & 0.21\% \\ \hline \hline \end{tabular}
\end{table}
Table 2: Statistics of Datasets.  
\[F1=\frac{2\times Precision\times Recall}{Precision+Recall}. \tag{21}\]  
where \(Fav(i)=\left\{j\in\Omega_{i}\big{|}R_{ij}\geq 4\right\}\) is the set of items that user \(u_{i}\) likes, and \(Rec(i)=\left\{j\in\Omega_{i}\big{|}\hat{R}_{ij}\geq 4\right\}\) is the set of items in the recommendation list which user \(u_{i}\) likes.  
In order to comprehensively evaluate the recommended effect of the TPSR framework proposed in this paper, we selected the following eight state-of-the-art social recommendation methods as baselines:  
1. [label=()]
2. Unifying user-based and item-based collaborative filtering approaches by similarity fusion (CF) [35], in which the rating of neighboring users is used to predict the rating of the target users.
3. Probabilistic matrix factorization (PMF) [8], in which users and items are mapped to low-dimensional vector space using Bayesian probability matrix decomposition.
4. Social recommendation using probabilistic matrix factorization (SoRec) [23], Bayesian probability matrix decomposition is proposed to use to establish the relationship between user preferences and trusted friends.
5. Social collaborative filtering by trust (TrustPMF) [7], in which trust and being trusted are considered.
6. User rating prediction based on trust-driven probabilistic matrix factorization (TPMF) [36], in which trusting users indirectly affect user preferences and directly affect user ratings.
7. Social recommendation with an essential preference space (SREPS) [10], in which network embedding rather than PMF is used.
8. Dual graph attention networks for a deep latent representation of the multifaceted social effects in recommendation systems (DANSER) [26], in which the dual graph attention networks are used and a new policy-based fusion strategy based on a contextual multi-armed bandit to weigh interactions of various social effects is proposed.
9. Feature evolution-based multi-task learning for collaborative filtering with social trust (TrustEV) [27], in which a special feature evolution unit that enables the embedding vectors for two tasks to exchange their features in a probabilistic manner is designed, and a meta-controller to globally explore proper settings for the feature evolution units is used.  
The CF and PMF methods use only rating data for recommendation, while SoRec, TrustPMF, TPMF, SREPS, DANSER, TrustEV and our TPSR use both trust data and rating data for recommendation. CF is based on the nearest neighbor method; SoRec, TrustPMF, PMF, TPMF and our TPSR are based on matrix factorization; and SREPS, DANSER and TrustEV are based on neural networks methods.