## 3 Methodology
### GRU Model
Here, \(\odot\) denotes the element-wise multiplication, and \(1-z_{t}\) is the complement of \(z_{t}\). The operation of weighting the sum signifies the new hidden state \(h_{t}\) is a tradeoff between \(u_{t}\) and \(h_{t-1}\) controlled by \(z_{t}\). The ratio of the previous hidden state \(h_{t-1}\) increases when the value of update gate \(z_{t}\) approaches 1 and diminishes as \(z_{t}\) approaches 0. The gating mechanism in the GRU allows for effective control over the messages flowing through the network, and its efficacy and excellence has been demonstrated across various tasks. Moreover, a series of GRUs with shared parameters can be concatenated and stacked into a network of multiple layers so as to be used for sequence prediction tasks. Figure 6 shows the architecture of such a network, which is typically called the GRU model. In Figure 6, the input sequence comprises a sequence of feature vectors: \(X_{1}\), \(X_{2}\), \(X_{3}\), and \(X_{n}\). As a sequence of data flows into the network, each GRU layer processes the sequence, updates the hidden state \(h_{t}\) sequentially at every time step \(t\), and passes the outputs to the next layer. This stacked configuration allows for capturing complex patterns in timeseries data. When used for the task of sequence-to-one prediction, the outputs in the last time step are fed into a fully connected layer, which integrates the learned representations and performs the final prediction of classification or regression tasks. Notably, the GRU model here in this paper is intended to be used for airfare prediction, and the input vector contains the aspect-based sentiment scores actually derived from customer reviews in addition to the flight ticket data. This rich fusion of sentiment analysis and flight ticket information serves as a comprehensive input for airfare prediction, capturing both the influence of public opinions and historical pricing trends. In this study, we employed an architecture comprising seven GRU layers with the following units: 824, 512, 256, 128, 64, 32, and 16. The rectified linear unit (ReLU) was used as the activation function, and the Adam optimizer was applied with a learning rate set at  
Figure 6: The stacked network structure of the GRU model. 0.001. All results presented in this study are based on test data, using a distribution ratio of 80% training set, 10% validation set, and 10% test set. Our experiment was conducted using the Python programming language. We specifically leveraged PyTorch and an NVIDIA GeForce GPU with 12 GB GDDR6X for building and training our deep learning models. The model underwent an extensive training process spanning 1400 epochs with a batch size of 450. Its design was explicitly crafted to optimize the balance between practical learning and computational efficiency. The detailed experimental architecture for the proposed ABSA_GRU flight fare prediction model is presented in Figure 7.  
Following its development, the model was subjected to rigorous testing on test datasets to ascertain its efficacy and generalizability. We evaluated the model's performance using the following metrics: mean absolute error (MAE) root mean squared error (RMSE), and coefficient of determination (R\({}^{2}\)), as defined in Equations (8)-(10) [45,46]. These metrics were helpful in comparing our model with others so as to verify its performance and gain insights into its strength and weakness in the context of flight fare analysis. \[MAE=\frac{1}{N}\ \sum_{i=1}^{N}\lvert y_{i}-\hat{y}_{i}\rvert \tag{8}\]  
\[RMSE=\sqrt{\frac{1}{N}\sum_{i=1}^{N}\left(y_{i}-\hat{y}_{i}\right)^{2}} \tag{9}\]  
\[\text{R}^{2}=1-\frac{RSS}{TSS}=1-\frac{\sum_{i=1}^{N}(y_{i}-\hat{y}_{i})^{2}}{ \sum_{i=1}^{N}(y_{i}-\overline{y}_{i})^{2}} \tag{10}\]  
The MAE measures the mean absolute error between predicted and actual values. In this context, \(y_{i}\) represents the actual fare, \(\hat{y}_{i}\) denotes the predicted fare, and \(N\) is the total number of observations.