# Leveraging User Comments for Recommendation in E-Commerce
## 5 Experimental Results  
To evaluate the performance of our proposed approach, we conduct a set of experiments on several benchmark datasets. For convenience, we call our approach CFUCC (Collaborative Filtering based on User Comments and Clustering) in the remainder of this section. We also compare our CFUCC approach with some other collaborative filtering recommender systems. Two metrics are adopted for comparison of recommendation accuracy, mean absolute error (MAE) and root mean squared error (RMSE) [47]. Let \(\mathcal{P}\) be the set of all products, and \(\mathcal{L}_{i}\) and \(\mathcal{T}_{i}\) be two sets containing the products user \(u_{i}\) has rated in the training set and in the testing set, respectively. Note that it is required that none of \(\mathcal{L}_{i}\) is empty, i.e., \(\mathcal{L}_{i}\
eq\varnothing\), \(1\leq i\leq N\). To compute MAE or RMSE, we have to convert predicted preferences to corresponding predicted scores. Let \(\hat{r}_{ij}\) be the predicted score corresponding to the predicted preference of product \(p_{j}\) for user \(u_{j}\). We compute \(\hat{r}_{ij}\) by  
\[\hat{r}_{ij}=r_{i}^{a}+\frac{\sum_{k=1\wedge k\
eq i}^{N}\bigl{[}\mathrm{Sim} (u_{i},u_{k})\times\left(r_{kj}-r_{k}^{a}\right)\bigr{]}}{\sum_{k=1\wedge k \
eq i}^{N}\mathrm{Sim}(u_{i},u_{k})} \tag{23}\]  
where \(r_{i}^{a}\) is the average of the ratings in \(\mathcal{L}_{i}\), \(r_{k}^{a}\) is the average of the ratings in \(\mathcal{L}_{k}\), \(r_{kj}\) is the rating for product \(j\) in \(\mathcal{L}_{k}\), and \(\mathrm{Sim}(u_{i},u_{k})\) indicates the similarity between user \(u_{i}\) and user \(u_{k}\) defined by the cosine of the predicted preference lists \(\mathbf{s}_{i}\) and \(\mathbf{s}_{k}\):  
\[\mathrm{Sim}(u_{i},u_{k})=\frac{\mathbf{s}_{i}\cdot\mathbf{s}_{k}}{\sqrt{ \mathbf{s}_{i}\cdot\mathbf{s}_{i}}\sqrt{\mathbf{s}_{k}\cdot\mathbf{s}_{k}}} \tag{24}\]  
with '\(\cdot\)' being the inner product operator for vectors. Then, MAE and RMSE are defined as  
\[\mathrm{MAE}=\frac{\sum_{i=1}^{N}\sum_{j=1\wedge r_{ij}\in\mathcal{T}_{i}}^{M }\bigl{|}r_{ij}-\hat{r}_{ij}\bigr{|}}{\sum_{i=1}^{N}\bigl{|}\mathcal{T}_{i} \bigr{|}} \tag{25}\]  
\[\mathrm{RMSE}=\sqrt{\frac{\sum_{i=1}^{N}\sum_{j=1\wedge r_{ij}\in\mathcal{T}_{ i}}^{M}\bigl{(}r_{ij}-\hat{r}_{ij}\bigr{)}^{2}}{\sum_{i=1}^{N}\bigl{|} \mathcal{T}_{i}\bigr{|}}}. \tag{26}\]  
Note that a low MAE or RMSE value indicates the superiority of a recommender system. A 5-fold cross-validation is adopted for our experiments. In each experiment, the entries in a dataset are split randomly into five different subsets. Then, five runs are performed. Each time, four of the five subsets are used for training, and the remaining one is used for testing. Then, the results of the five runs are averaged. Note that in each of the following experiments, the predicted preference lists are derived from the training set and all MAE and RMSE are measured on the testing set. In addition, no overlapping exists between the training set and the testing set in any experiment. In the following experiments, we work with three datasets, Amazon Digital Music, Amazon Video Game, and Amazon Apps for Android. They were collected by [PERSON] from Amazon.com over a period of 18 years (2014-1996) and were described in [48; 49]. Each piece of data contains the information as shown in Figure 2. Several fields of information were recorded. However, we are interested in the fields of'reviewerID' (user ID), 'asin' (item ID),'reviewText' (user text comments to the item), and 'overall' (user's rating to the item). Among them, 'asin' and'reviewText' are used by Word2 Vec to form item vectors, while'reviewerID' and 'overall' are used in forming the user-item rating matrix. Each non-zero entry in the matrix is represented as a triple \(\left(u_{i},\ p_{i},\ r_{ij}\right)\) where \(r_{ij}\in\left\{1,\ 2,\ 3,\ 4,\ 5\right\}\). The Amazon Digital Music dataset contains 64,706 reviews, with 5541 users and 3568 items. The sparsity of this dataset is \(1-\frac{64706}{5541\times 3568}=99.7\%\).