# Leveraging User Comments for Recommendation in E-Commerce
## 4 Proposed Approach
### Step 2--Grouping for Items and Users  
This step aims to deal with the scalability problem. First of all, the dimensionality, \(H\), can be too large for effective processing. PCA (Principal Component Analysis) [44; 45] is applied to reduce the dimensionality of the item and user vectors. We choose \(q_{p}\) and \(q_{u}\) as principal components so that they are as small as possible, and the cumulative energy is above a certain threshold \(\theta\), e.g., 0.7. Therefore, there are \(q_{p}\), instead of \(H\), values in \(\mathbf{p}_{i}\), \(i=1,\cdots\), \(M\), and there are \(q_{u}\), instead of \(H\), values in \(\mathbf{u}_{i}\), \(i=1,\cdots\), \(N\).  
Now, we apply an iterative self-constructing clustering algorithm [46], which is an iterative version of that used in [23], to partition the item and user vectors into item and user groups, respectively. We feed the item vectors, \(\mathbf{p}_{i}\), \(1\leq i\leq M\), as the training patterns, to the clustering algorithm. For each pattern \(\mathbf{p}_{i}\), \(i=1,\cdots,M\), the membership degree of the pattern to each existing cluster \(C_{j}\), with center \(\left[c_{1j}^{p}\cdots c_{q_{j}j}^{p}\right]^{T}\) and deviation \(\left[d_{1j}^{p}\cdots d_{q_{j}j}^{p}\right]^{T}\), is calculated as  
\[G_{j}(\mathbf{p}_{i})=\prod_{k=1}^{q_{p}}\exp\left[-\left(\frac{p_{ki}-c_{kj}^ {p}}{d_{kj}^{p}}\right)^{2}\right]. \tag{10}\]If \(G_{j}(\mathbf{p}_{i})<\rho\) for all existing clusters, a new cluster is created, and \(\mathbf{p}_{i}\) is included in the new cluster. Otherwise, \(\mathbf{p}_{i}\) is added into the cluster with the largest membership degree. Note that Gaussian is adopted to describe the data distribution of each cluster, and \(G_{j}(\mathbf{p}_{i})\) lies in the range of \((0,1]\). Suppose we have \(M_{g}\) clusters \(C_{1}^{p},C_{2}^{p},\cdots,C_{M_{g}}^{p}\) at the end, each having its own center and deviation. Each cluster is regarded as one item group. Therefore, we have \(M_{g}\) item groups, denoted \(p_{1}^{g},p_{2}^{g},\cdots,p_{M_{g}}^{g}\), respectively. Let  
\[t_{ij}^{p}=G_{j}(\mathbf{p}_{i}) \tag{11}\]  
for \(1\leq i\leq M\) and \(1\leq j\leq M_{g}\). Then, we form the transformation matrix  
\[\mathbf{T}_{p}=\left[\begin{array}{cccc}p_{11}^{p}&p_{12}^{p}&\cdots&t_{1M_ {g}}^{p}\\ t_{21}^{p}&t_{22}^{p}&\cdots&t_{2M_{g}}^{p}\\ \vdots&\vdots&\ddots&\vdots\\ p_{M1}^{p}&t_{M2}^{p}&\cdots&t_{MM_{g}}^{p}\end{array}\right] \tag{12}\]  
which is an \(M\times M_{g}\) matrix, containing all the membership degrees of the products \(p_{i}\), \(1\leq i\leq M\), to the item groups \(p_{j}^{g}\), \(1\leq i\leq M_{g}\).  
Next, we feed the user vectors, \(\mathbf{u}_{i}\), \(1\leq i\leq N\), as the training patterns, to the clustering algorithm. Suppose we have \(N_{g}\) clusters \(C_{1}^{u}\), \(C_{2}^{u},\cdots\), \(C_{N_{g}}^{u}\) at the end. Each cluster is regarded as one user group. Therefore, we have \(N_{g}\) user groups, denoted \(u_{1}^{g}\), \(u_{2}^{g},\cdots\), \(u_{N_{g}}^{g}\), respectively. Let \(t_{ij}^{u}\) denote the membership degree of \(\mathbf{u}_{i}\) to cluster \(C_{j}^{u}\), computed as  
\[t_{ij}^{u}=G_{j}(\mathbf{u}_{i})=\prod_{k=1}^{q_{u}}\exp\left[-\left(\frac{u _{ki}-c_{kj}^{u}}{d_{kj}^{u}}\right)^{2}\right] \tag{13}\]  
for \(1\leq i\leq N\) and \(1\leq j\leq N_{g}\). Then, we form the transformation matrix  
\[\mathbf{T}^{u}=\left[\begin{array}{cccc}t_{11}^{u}&t_{12}^{u}&\cdots&t_{1N_ {g}}^{u}\\ t_{21}^{u}&t_{22}^{u}&\cdots&t_{2N_{g}}^{u}\\ \vdots&\vdots&\ddots&\vdots\\ t_{N1}^{u}&t_{N2}^{u}&\cdots&t_{NN_{g}}^{u}\end{array}\right] \tag{14}\]  
which is an \(N\times N_{g}\) matrix, containing all the membership degrees of the users \(u_{i}\), \(1\leq i\leq N\), to the user groups \(u_{j}^{g}\), \(1\leq j\leq N_{g}\).