# Leveraging User Comments for Recommendation in E-Commerce
## 4 Proposed Approach  
Suppose, from some other sources, we know that \(p_{1},\ p_{2},\ p_{3}\), and \(p_{4}\) in Table 1 are similar to each other, and so are \(p_{5},\ \ p_{6}\), and \(p_{7}\). Then, we can somehow cluster these seven products into two item groups, say, \(p_{1}^{g}\) and \(p_{2}^{g}\), and transform the matrix to something similar to the one shown in Table 2. Assume that the ratings in this table are obtained by taking the maximum of the original product ratings. Clearly, there exist two groups of similar users, namely, \(\{u_{1},\ u_{2},u_{3},\ u_{4}\}\) and \(\{u_{5},\ u_{6},u_{7}\}\), and recommendations through the similarity between users can be done by collaborative filtering.  
Motivated by this idea, we propose a novel approach to overcome the inaccuracy and inefficiency caused by data sparsity and scalability. Our approach consists of five steps: developing item and user vectors, grouping for items and users, getting a reduced user-item rating matrix, calculating group rating scores, and deriving individual preference lists. Step 1 aims to overcome the sparsity problem by exploiting extra information from user comments. Item and user vectors are derived. Step 2 aims to deal with the scalability problem. In this step, products and users are clustered into item groups  
\begin{table}
\begin{tabular}{c c c} \hline \hline  & \(p_{1}^{g}\) & \(p_{2}^{g}\) \\ \hline \(u_{1}\) & 5 & 1 \\ \(u_{2}\) & 5 & 1 \\ \(u_{3}\) & 5 & 1 \\ \(u_{4}\) & 5 & 1 \\ \(u_{5}\) & 1 & 5 \\ \(u_{6}\) & 1 & 5 \\ \(u_{7}\) & 1 & 5 \\ \hline \hline \end{tabular}
\end{table}
Table 2: The user-item rating matrix after a clustering of products.  
and user groups, respectively. As a result, the numbers of products and users are greatly reduced. In step 3, the original user-item rating matrix is converted to a reduced user-item rating matrix that involves item groups and user groups. In step 4, a series of random walks are executed on the reduced user-item rating matrix, and a preference list of item groups is derived for each user group. Since low numbers of item groups and user groups are involved, this step can be done efficiently. Finally, in step 5, reverse transformations are performed, and preference lists of individual products are offered to each user. The pseudo-code of the approach is given below. Details will be described later.  
\begin{tabular}{l} \hline \hline
**The Proposed Approach** \\ \hline /\(\star\) Step 1: Developing item and user vectors \(\star\)/ \\ Extract training patterns from the collected user comments; \\ Train the Word2 Vec network and obtain item vectors and user vectors; \\ /\(\star\) Step 2: Grouping for items and users \(\star\)/ \\ Reduce the dimensionality of item and user vectors; \\ Cluster the item and user vectors into item and user groups; \\ Obtain transformation matrices of membership degrees; \\ /\(\star\) Step 3: Getting the reduced user-item rating matrix \(\star\)/ \\ Transform the original user-item rating matrix to the reduced matrix; \\ /\(\star\) Step 4: Calculating group rating scores \(\star\)/ \\ Construct the correlation matrix from the reduced user-item rating matrix; \\ Apply ItemRank to predict preference lists of item groups for user groups; \\ /\(\star\) Step 5: Deriving individual preference lists \(\star\)/ \\ Reversely transform to obtain preference lists of products for users; \\ \hline \hline \end{tabular}