# A Personalized Recommendation Algorithm Based on the User's Implicit Feedback in E-Commerce
## 5 The Recommendation Algorithm Based on the User's Implicit Feedback  
Based on the previous introduction, we considered the user's clicking, adding, collecting, and buying behaviors and built item pairs by the user's interaction with the JD system to calculate the user's similarity more accurately, and we learned the vector space representation of items with word2 vec technology to calculate the items' similarity more reasonably. Additionally, we obtained the user's candidate set and item's candidate set and relied on the two methods, and then, the recommended results were generated by the secondary reordering. Figure 3 shows the overview of the whole algorithm. When recommending items to users, we should first choose the K nearest neighbors of the users. Traditional CF always chooses the K nearest neighbors from all of the users, which increases the calculation time. To solve this problem, we set a threshold \(\beta\) to obtain a candidate set of users. Here, \(\beta\) is repressed by Equation (7):  
\[\beta=\overline{Sim_{user}(u)}=\frac{\sum_{i}^{m}Sim_{user}(i)}{m}, \tag{7}\]  
where \(\overline{Sim_{user}(u)}\) is the average similarity of the target user. If \(Sim(u,v)\geq\beta\), then user \(v\) will be added to the candidate set of user \(u\). Different from the method in Reference [18], which calculates the item's similarity by a single item vector, we considered the item-sequences that users had before purchasing a specific item, and we  
Figure 3: Overview of the recommendation algorithm based on the user’s implicit feedback. Figure 2: Word2 vec models. attempted to predict the user's purchase intention, as represented by \(vec_{u}\), which is expressed by Equation (8):  
\[vec_{u}=\frac{\sum_{i}^{n}vec_{i}*w_{u,k}}{n}, \tag{8}\]  
where \(vec_{i}\) indicates the vector of the item that the user had browsed recently, and \(w_{u,k}\) indicates the weight of \(f_{k}\) of the user. The same as with a user, we also set a threshold \(\gamma\) to obtain a candidate set of items. Here, \(\overline{Sim_{item}(i)}\) is the average similarity to the user's purchase intention \(vec_{u}\), as expressed by Equation (9):  
\[\gamma=\overline{Sim_{item}(i)}=\frac{\sum_{k=1}^{m}Sim_{item}(k)}{m}. \tag{9}\]  
If \(Sim(vec_{u},j)\geq\gamma\), then item \(j\) will be added to the candidate set of \(vec_{u}\). Reference [3] has proved that the CF based on the items is superior to the CF based on the users. Therefore, we focused on selecting the item's nearest neighbors for recommendations. Equation (10) expresses the traditional CF based on the items. \[R_{(u,j)}=\frac{\sum_{j\in set_{i}}sim(i,j)\times R_{(u,j)}}{\sum_{j\in set_{ i}}|sim(i,j)|}. \tag{10}\]  
We obtained \(R_{(u,j)}\), which means the preference of user \(u\) to item \(i\), and then, recommended the items by \(R_{(u,j)}\) from high to low. In contrast to the traditional CF, we considered the user's candidate set to reorder the item's candidate set to obtain better recommendation results. Suppose that \(S_{i,j}\) describes the item-support of items \(i\) and \(j\), respectively; then, it is calculated by Equation (11):  
\[S_{i,j}=\frac{\sum_{v\in Set_{(i)}}^{n}G(v,i,j)}{\max\left(\sum_{v\in Set_{(i )}}^{n}G(v,i,j)\right)}, \tag{11}\]  
where \(i\) and \(j\) means items, and \(v_{log}\) means the behavior log of user \(v\). If \(i\in v_{log},j\in v_{log}\), then \(G(v,i,j)=1\); otherwise, \(G(v,i,j)=0\). Therefore, we calculated the \(R_{(u,i)}\) more accurately by Equation (12):  
\[R_{(u,i)}=\frac{\sum_{j\in Set_{(i)}}sim(i,j)\times R_{(u,j)}\times S_{i,j}}{ \sum_{j\in set_{i}}|sim(i,j)|}. \tag{12}\]  
We illustrate the specific principle with an example: assume that the candidate set of user \(u\) is \(\{v_{1},v_{2},v_{3},v_{4}\}\), and the candidate set of item \(i\) is \(\{j_{1},j_{2},j_{3},\ j_{4}\}\).