# A Network Traffic Prediction Method for AIOps Based on TDA and Attention GRU
## 5 Experimental Results and Analysis
### Model Comparison Experiment  
To explore the advantages and disadvantages of the TCAG model, this study used the features extracted by TDA + CNN to train MLP, TCN, LSTM, GRU, TCAG, and other neural network models for comparative experiments. In Table 4, the best and worst values for each evaluation indicators are marked in bold. Amongst the four models compared, the \(R^{2}\) value of the MLP model was the smallest, indicating that there were complex changes in the data, resulting in poor fitting of the model. The \(R^{2}\) score of TCAG is the only value greater than 0, which further explains \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & **MSE** & \(R^{2}\) & **MAPE** & **20\% ACC** & **15\% ACC** & **10\% ACC** \\ \hline Original features & 0.0034 & \(-\)0.195 & 0.0845 & 0.9664 & 0.8498 & 0.6998 \\ TSNE characteristics & 0.0031 & \(-\)0.0729 & 0.0779 & 0.9832 & 0.8498 & 0.6828 \\ ICA characteristics & 0.0034 & \(-\)0.1764 & 0.0839 & **0.9916** & 0.8828 & **0.6078** \\ PCA characteristics & **0.0038** & \(-\)**0.3069** & **0.0896** & **0.9498** & **0.7996** & 0.6246 \\ TDA + CNN features & **0.0027** & **0.0443** & **0.0707** & 0.9832 & **0.8832** & **0.7162** \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Comparison of original features, PCA features, ICA features, TSNE features, TDA + CNN features. the complexity of the data and shows that the TCAG model can achieve a better fitting effect than other benchmark models. The average absolute percentage error of TCAG was 7.56%, 8.96% higher than that of the worst MLP. Compared with other benchmark models, they satisfy higher accuracy requirements. As shown in Table 4, the performances of TCN, LSTM, and GRU are similar in various indices, which are located between MLP and TCAG. In addition, it can be seen from Figure 8 that the accuracy of TCAG does not decline with the increase of prediction steps, which indicates that the model has strong generalization ability and can learn the historical laws of data well. It can be seen from Figures 8-12 that TCAG has the best fitting effect among the five models, and only two of the predicted 24 points exceeded the range of 15% ACC. The MLP model has the worst fitting effect, with a large number of predicted values exceeding the range of 15% ACC, and the error increases with an increase in the prediction step size. The TCN model misestimates the fluctuation range of the value in the range of the step size [4,9] but then returns to a more normal state. The effect of LSTM is close to that of the GRU and second only to the TCAG model. \begin{table}
\begin{tabular}{c c c c c c c} \hline  & **MSE** & \(R^{2}\) & **MAPE** & **20\% ACC** & **15\% ACC** & **10\% ACC** \\ \hline MLP & **0.0344** & \(-1.1096\) & **0.1652** & **0.699** & **0.499** & **0.283** \\ TCN & 0.0066 & **-1.2635** & 0.1065 & 0.883 & 0.766 & 0.574 \\ LSTM & 0.0044 & \(-0.5298\) & 0.0916 & 0.916 & 0.783 & 0.561 \\ GRU & 0.0057 & \(-0.9725\) & 0.1105 & 0.824 & 0.691 & 0.533 \\ TCAG & **0.003** & **0.0401** & **0.0756** & **0.958** & **0.874** & **0.724** \\ \hline \end{tabular}
\end{table} 
Table 4: Comparison of MLP, TCN, LSTM, GRU, TCAG. Figure 8: TCAG model prediction results. Figure 11: LSTM model prediction results. Figure 10: TCN model prediction results. Figure 9: MLP model prediction results. In summary, the TCAG model achieved the best score for all evaluation indicators, which proves that the model is superior to the four benchmark models in terms of prediction accuracy and robustness and proves the correctness of selecting the GRU model as the TCAG model component. Finally, the dynamic threshold interval is calculated according to Formula (2), as shown in Figure 13. The blue solid line is the actual value, the red solid line is the predicted value, and the blue shaded area represents the dynamic threshold interval at 95% confidence. The upper and lower boundaries of the area are used as the threshold to trigger the alarm.