## 3 Proposed Method
### Review Rating Prediction  
The feature vector is given as an input. The proposed spider Taylor-ChOA-based HAN is adapted to categorize sentiments from reviews using the feature vector. Here, the spider Taylor-ChOA-based HAN is obtained by combining the spider Taylor-ChOA in the HAN model for choosing the optimal weights present in HAN. The developed spider Taylor-ChOA is employed to optimize HAN [27] by selecting the optimal weights. The structure of HAN and the training process are given below. **Architecture of HAN:** The model of HAN [27] is displayed in Figure 3. It helps to concentrate on information for creating memories and focus on a particular task. It is flexible and easy to use. The network has the ability to deal with various kinds of data. It selectively focuses on valuable parts. The HAN consists of several units, such as the word-level attention layer, word sequence encoder, sentence-level attention layer, and sentence encoder. Assume a review comprises \(L\) sentences \(s_{i}\) and each sentence consists of \(T_{i}\) words. \(w_{it}\) with \(T\in[1,T]\) expresses words in the \(i\)th sentence. **(i)**_Word encoder:_ Given a sentence with words \(w_{i,t},t\in[0,T]\), firstly the embedding of words to vectors is performed with an embedding matrix \(W_{e},x_{i,j}=W_{e}w_{i,j}\). The bidirectional GRU is used to obtain word annotations by summarizing the data with both directions of words and thus using contextual data in the annotation. The bidirectional GRU consists of a forward GRU \(\vec{f}\) that reads sentence \(s_{i}\) with \(w_{i1}\) to \(w_{iT}\) and backward GRU \(\vec{f}\) that reads using \(w_{iT}\) to \(w_{i1}\):  
\[x_{it}=W_{e}w_{it},t\in[1,T] \tag{45}\]  
\[\vec{h}_{it}=G\vec{R}U(x_{it}),t\in[1,T] \tag{46}\]  
\[\overleftarrow{h}_{it}= G\vec{R}U\left(x_{it}\right),t\in[T,1] \tag{47}\]  
This unit generates an annotation for a given word \(w_{it}\) by combining the forward hidden state \(\vec{h}_{it}\) and the backward hidden state \(\vec{h}_{it}\) wherein \(h_{it}=\left[\vec{h}_{it},\vec{h}_{it}\right]\) that recapitulates data from the whole sentence centered among \(w_{it}\). _(ii) Word attention:_ Here, the attention method is used to mine the words that are essential to the meaning of the sentence and accumulate an illustration of informative words to form the sentence vector. \[u_{it}=\tanh(W_{w}h_{it}+b_{w}) \tag{48}\]  
\[\alpha_{it}=\frac{\exp(u_{it}u_{w})}{\sum_{t}\exp(u_{it}u_{w})} \tag{49}\]  
\[s_{i}=\sum_{t}\alpha_{it}h_{it} \tag{50}\]  
Here, the word annotation \(h_{it}\) is subjected with one-layer MLP for obtaining \(u_{it}\) as the hidden representation of \(h_{it}\), evaluating the importance of word \(u_{it}\) with the word-level context vector \(u_{w}\), and acquiring normalized significance weight \(\alpha_{it}\) with the softmax function. Here, the word context vector \(u_{w}\) is randomly initialized and learned jointly in the training process. _(iii) Sentence encoder:_ Provided the sentence vector, a review vector is obtained in which the bidirectional GRU is adapted to encode the sentences, which is expressed as,  
\[\vec{h}_{i}=G\vec{R}U(s_{i}),i\in[1,L] \tag{51}\]  
\[\vec{h}_{i}=GRU(s_{i}),i\in[L,1] \tag{52}\]  
The combination of \(\vec{h}_{i}\) and \(\vec{h}_{j}\) to produce sentence annotation \(i\), that is, \(h_{i}=\left[\vec{h}_{i},\vec{h}_{i}\right]\), and \(h_{i}\) reveals the neighbor sentence around sentence \(i\) and concentrates on sentence \(i\). _(iv) Sentence attention:_ For rewarding sentences that are clues for accurately classifying a review, the attention method is used, as well as for developing a sentence-level context vector \(u_{s}\) and using the vector for evaluating sentence importance, and is expressed as,  
Figure 3: An illustration of hierarchical attention network (HAN) Model. \[x_{it}=W_{e}w_{it},t\in[1,T] \tag{45}\]0  
where \(\vec{h}_{i}\) is the sentence annotation, \(W_{s}\) is the sentence attention matrix, and \(b_{s}\) refers to the bias.