## 3 Theory and Methods
### Grey Wolf Optimizer (GWO)  
Within the GRU model, specific parameters function as internal variables that are capable of automatic modification and refinement throughout the training phase. On the other hand, external variables, known as model hyperparameters, play a crucial role in achieving distinct goals and must undergo continual adjustments. Manually altering these hyperparameters is clearly not recommended. In this study, a technique is suggested for intelligently modifying the hyperparameters of the GRU model with the application of the grey wolf optimizer. The grey wolf optimizer utilizes the root mean square error (RMSE) as its fitness function and finetunes the hyperparametric values of the model to enhance the prediction accuracy to its optimal level. GWO, an intelligent optimization algorithm introduced by Australian researcher [PERSON], is founded on grey wolves' group predatory actions, enabling the attainment of an equilibrium between local optimization and wide-ranging exploration. The algorithm simulates the competitive and cooperative behaviors of grey wolves in their populations, whose strict adherence to a social hierarchy provides inspiration for the algorithm. The structure of the GWO first mimics the social hierarchy of the pack by grading the wolves differently, with the highest-ranked \(\alpha\) wolf being the leader of the pack and in charge of decision-making within the pack, followed by the \(\beta\) and \(\delta\) wolves, which correspond to the three best-adapted parameters, respectively, and the rest of the grey wolves labeled as \(\omega\). The society ranks of the grey wolf population are shown in Figure 10.  
The iterative process of the algorithm guides the movement of \(\omega\) wolves through \(\alpha\), \(\beta\), and \(\delta\) wolves to achieve global optimization. The hunting behavior of the grey wolves' group is shown as the following:  
\[\overset{\rightarrow}{D}=\left|\overset{\rightarrow}{C}\cdot\overset{ \rightarrow}{X}_{P}(t)-\overset{\rightarrow}{X}(t)\right| \tag{15}\]  
\[\overset{\rightarrow}{X}(t+1)=\overset{\rightarrow}{X}_{P}(t)-\overset{ \rightarrow}{A}\cdot\overset{\rightarrow}{D} \tag{16}\]  
where \(\overset{\rightarrow}{X}_{P}\) denotes the current location vector of the prey, \(\overset{\rightarrow}{D}\) denotes the location gap between the grey wolf and prey, \(\overset{\rightarrow}{X}(t)\) denotes the current location vector of the individual grey wolf, \(\overset{\rightarrow}{X}(t+1)\) denotes the direction of the next movement of the individual grey  
Figure 10: Society ranks of the grey wolf population. and use the values corresponding to the optimal fitness values as the hyperparameters of the model for model training. Step 4. Divide the training set and test set of each component, and build a GWO-GRU model separately for training and prediction. The prediction results for each component can be obtained, and the model's evaluation metrics can be calculated. Step 5. Superimpose the prediction results of each component to obtain the final prediction result, and calculate the evaluation index of the final prediction result. In this paper, we chose a group of fundamental parameters that were substantiated by various research for their forecasting impacts, such as the quantity of input layers, the quantity of output layers, the quantity of completely connected layers, the decreasing factor for the learning rate, the regularization factor, the algorithm for gradient descent, and the function for activation, and the specific parameters are detailed in Table 2.  
Meanwhile, the GRU neural network presents numerous hyperparameters open to optimization. The GWO algorithm was employed to pinpoint key parameters affecting model accuracy, including the hidden layer unit count, initial learning rate, and iteration quantity. The GWO algorithm's population size was fixed at 5, with 20 iterations set for optimization. Refer to Table 3 for details on the optimization intervals for the aforementioned hyperparameters.