## 4 Proposed HTPR Method
### Feature Supplementation Based on Item Clustering  
By using item clustering, similar neighbor items were selected for items without rating to predict their rating. As a result, a user-item rating matrix could be supplemented. The feature input of a recommendation system could be transformed into optimization problems of feature extraction, feature combination. The function of the feature combination was to combine the basic features extracted from different data sources, which contributed to the perfection of feature input. In the process of item clustering, feature input was constituted by the item/attribute matrix and the item review tag matrix. Item attributes contained the metadata of items, and item review tag extracted from the content of reviews, which was the community opinions of a user on an item. **Definition 1**. : _For an item set with \(m\) items and \(p\) kinds of attributes, \(q\) tags are extracted from the review content of a user, and then item/attribute matrix and item review tag matrix can be represented as (1) and (2) respectively,_  
\[A=\left(a_{j,\rho}\right)_{m\times p}, \tag{1}\] \[a_{j,\rho}\in\{0,1\},\qquad a_{j,\rho}=\left\{ \begin{array}{l} 1,\ j^{th}\text{ item has }\varphi^{th}\text{ attribute}\\ 0,\text{ otherwise}\end{array} \right.\]  
\[Tag=\left(tag_{j,\eta}\right)_{m\times q^{\prime}},\ 0<tag_{j,\eta}<1. \tag{2}\]  
Figure 3: Overview of HTPR method. As shown in Table 3, the feature combination can be represented as a \(m\times(p+q)\) matrix, denoted as:  
\[S=\left(s_{i,j}\right)_{m\times l^{\prime}}l=p+q,\ s_{i,j}\in[0,1]. \tag{3}\]  
For two arbitrary items \(\overset{\rightarrow}{u}=\left\{s_{\mu,1},s_{\mu,2},\ldots,s_{\mu,k},\ldots,s _{\mu,l}\right\}\) and \(\overset{\rightarrow}{v}=\left\{s_{\
u,1},s_{\
u,2},\ldots,s_{\mu,k},\ldots,s _{\
u,l}\right\}\), the similarity of the items is measured by their distance,  
\[sim^{\prime}(u,v)=\sum_{k=1}^{l}\frac{\lambda_{k}}{1+d(s_{\mu,k}s_{\
u,k})}= \sum_{k=1}^{l}\frac{\lambda_{k}}{1+\left|s_{\mu,k}-s_{\
u,k}\right|} \tag{4}\]  
where \(\lambda_{k}(0\leq\lambda_{k}\leq 1)\) is the weight of the \(k\)-th feature; \(d(s_{\mu,k},s_{\
u,k})\) denotes the absolute value of the distance between the items \(u\) and \(v\) for the \(k\)-th feature; the similarity of the items \(u\) and \(v\) for the \(k\)-th feature is denoted as \(\frac{1}{1+d(s_{\mu,k}s_{\
u,k})}\). In this paper, the commonly used K-Means clustering algorithm is applied for item clustering (Algorithm 1). ```
Input: The item set \(E=\left\{e_{1},e_{2},\ldots,e_{m}\right\}\) The item feature matrix \(S_{m\times l}\) The number of clusters \(k_{1}\) Output: The item clusters \(E_{1},E_{2},\ldots,E_{k_{1}}\) The cluster centers \(c_{1},c_{2},\ldots,c_{k_{1}}\)
1: select some items whose number is \(k_{1}\) from item set \(E\) at random, i.e.\(\mathcal{E}_{1},e_{2},\ldots,e_{k_{1}}\), as the initial cluster centers
2:for each item \(e\in E\)
3: calculate its similarity with each cluster center, in turn, according to (4), and assign it to the corresponding cluster
4:endfor
5:for each cluster
6: adjust the cluster center according to the average value of all items in the cluster, i.e., \(c_{i}=\frac{1}{n_{i}}\sum e,i=1,2,\ldots,k_{1}\), where \(n_{i}\) is the number of items for the \(i\)-th cluster
7:endfor
8:return to step 2 till the square error of the cluster criterion function, i.e., reaches convergence
```  
**Algorithm 1**Item-Clustering-K-Means  
Therefore, with the use of Algorithm 1, item set \(E\) will be divided into \(k_{1}\) categories (namely clusters), i.e., \(E_{1},E_{2},\ldots,E_{k_{1}}\) with \(E_{1}\cup E_{2}\cup\ldots\cup E_{k_{1}}=E\) and \(E_{i}\cap E_{j}=\varnothing\) (\(i,j\in[1,k_{1}]\)). According to the analysis above, two item similarity calculation methods are introduced in the following. Given that the number of users is \(n\), for the user \(u\) and the user \(v\), their union set of rated items is denoted as \(E_{uv}=E_{u}UE_{v}\), and the set of items without a rating for the user \(u\) is denoted as \(N_{u}=E_{uv}-E_{u}\).