## 4 Prediction Based on GA-PSO-BP Neural Network
### Comparison of BP, PSO-BP, and GA-PSO-BP Calculation Accuracy  
In order to further validate the prediction performance of the three machine learning prediction models, we combined these models with the simulation model of the EN AW 5052 aluminium alloy variable diameter tubes hydroforming constructed in the previous finite element simulation software. A comparison of the computational accuracy of models constructed based on BP neural networks and PSO-BP particle swarm optimisation neural network algorithms and models was based on genetically improved PSO-BP neural networks. The four sets of randomly selected data within the range of forming parameters need to be combined with the actual production experience of the aluminium alloy variable diameter tubes hydroforming and to avoid duplication with the database established in the previous section. The final set process parameters are shown in Table 7. The error analysis of the prediction and simulation results using the three models is shown in Figure 11.  
Comparing the neural network prediction results and the finite element simulation results, it can be found that the neural network prediction model based on the GA-PSO-BP algorithm is in better agreement with the finite element simulation results. However, the second set of experiments shows from the input parameters and the forming effect that the condition is far from making the model reach the better-filled rate, and the deformation results of the tubes are not very informative. Therefore, the prediction result of the maximum expansion height of forming has a large error with the simulation result, and one of the reasons for the inaccurate prediction result is also related to the composition of the training set of the neural network model. In addition to this, the overall prediction accuracy is over 98%, which is a high prediction accuracy. It is fully demonstrated that the GA-PSO-BP neural network model for the prediction of hydraulic forming accuracy of the aluminium alloy variable diameter tubes established in this paper has good performance in the prediction of various parameters after forming, and it also verifies the reliability of the model in practical use. \begin{table}
\begin{tabular}{c c c c} \hline
**No.** & **Internal Pressure/MPa** & **Axial Feeds/mm** & **Friction Coefficient** \\ \hline
1 & 36.4 & 10.8 & 0.1 \\
2 & 30 & 8.68 & 0.15 \\
3 & 12.58 & 3.43 & 0.2 \\
4 & 24.66 & 7.68 & 0.05 \\ \hline \end{tabular}
\end{table} 
Table 7: Validation of experimental process parameters. In order to more accurately judge the accuracy of the constructed model, in this paper, we will use the three performance metrics MAE, RMSE, and \(R^{2}\) mentioned in the previous section to compare the performance of BP, PSO-BP, GA-PSO-BP models, respectively. The error comparisons of the three specific forming parameters using the three different algorithms are shown in Figure 12.  
As can be seen from Figure 12, the neural network model established directly based on the BP algorithm, when forming results are predicted for the four groups of randomly selected data, the results for the minimum wall thickness and the maximum wall thickness forming parameters with respect to the \(R^{2}\) evaluation indexes are 0.75 and 0.853, with a high prediction precision. However, the result for the maximum forming height with respect to the \(R^{2}\) evaluation index is 0.703, which is still a large error. The introduction of the particle swarm optimisation algorithm is used to replace the initialised weights in the former by iterative optimisation search, so that the results of the three shaping parameter \(R^{2}\) evaluation indexes of the improved model are 0.83, 0.915, and 0.950, and the prediction accuracy is effectively improved. However, the mean error function (MAE) is not greatly improved compared to the BP neural network.