## 4 SSA-ELMAN Neural Network Model
### Construction of Prediction Model Based on SSA-Elman Neural Network  
The flow chart of the prediction model for the height of the WFFZ based on the SSA-Elman neural network is shown in Figure 4.  
Step 1: Model parameter setting  
The Elman neural network model parameters were set as follows. The number used for network training was 1000, the minimum training error was 0.0001, the learning rate was 0.01, and the momentum factor was 0.01. The SSA algorithm model parameters were set as follows. The sparrow population was 30, the maximum number of evolutionary generations was 300, the safety threshold was 0.6, the proportion of producers was 0.7, the target error was \(1\times 10^{-6}\), and the proportion of guards was 0.2. Step 2: Model training  
First, the following empirical formula for the hidden layer nodes [24] was used to determine the network structure. \[num=\sqrt{(m+n)}+a \tag{7}\]  
where num denotes the quantity of hidden layer nodes, \(m\) indicates the amount of input layer nodes, \(n\) represents the number of output layer nodes, and \(a\) represents an integer between [1,10]. The best number of hidden layer nodes was determined to be seven when the training was completed. The SSA was then utilized to determine the Elman neural network's ideal weights and thresholds. The first 13 samples were selected from the normalized data as the training set, when the number of network training reaches 13 times, the prediction error of the model can reach 3.8 \(\times\) 10\({}^{-7}\), which is lower than the preset target error value of 1 \(\times\) 10\({}^{-6}\). At this time, the model has met the demand for accuracy and can be used for predicting the height of the WFFZ for the test set. The curve of error convergence during the training procedure is shown in Figure 5.  
The mean square error was used as the fitness function, and according to the initial fitness calculation result of the population, the ranking is performed to determine the best and worst-adapted individuals. Based on Equations (3)-(5), the fitness values of the current individuals are calculated and the positions of discoverers, joiners, and guards are updated respectively, if the new position is preferable to the position of the previous iteration, it is updated until the termination condition (the model reaches the maximum training times or meets the demand for accuracy) is satisfied, the global optimal value is found and given to the weights and thresholds of the ELMAN neural network. The fitness function curve during the training process is shown in Figure 6.  
Figure 4: Flow of SSA-ELMAN model. The fitness leveled out as the number of iterations reached 36, and the curve leveled off. The obtained optimal weight matrix and threshold matrix were updated onto the neural network, and the last five groups of collected samples were used to evaluate the regression effects of the different models. Step 3: Model evaluation  
The mean absolute error (MAE) and root mean square error (RMSE) were used to evaluate the performances of the prediction models:  
\[MAE=\frac{1}{n}\sum_{i=1}^{n}\lvert\hat{y}_{i}-y_{i}\rvert \tag{8}\]  
\[RMSE=\sqrt{\frac{1}{n}\sum_{i=1}^{n}(\hat{y}_{i}-y_{i})^{2}} \tag{9}\]  
where \(\hat{y}_{i}\) represents the predicted value, \(y_{i}\) represents the true value, and \(n\) represents the total number of samples. Figure 5: Error convergence curve. Figure 6: SSA-ELMAN fitness convergence curve. The trained SSA-Elman neural network prediction model was tested using the test samples to determine the predicted value of the test sample, and it was compared with the performance using the predicted values of the empirical formulas. The results are shown in Figure 7.  
The contrast of the prediction performances of the various models is shown in \[num=\sqrt{(m+n)}+a \tag{7}\]0 The MAE values and RMSE values for the predicted values of the height of the WFFZ obtained using the SSA-Elman neural network model are 3.93 and 4.93, respectively, which are less than the corresponding results calculated using the other methods.