# Transformer Fault Diagnosis Method Based on SCA-VMD and Improved GoogLeNet
## 4 Tests and Analysis of Results
### Comparative Analysis of Models  
In the experiment, in order to find the optimal division ratio, the model training process sequentially used the ratio parameters 3:1, 4:1 and 5:1 for the same dataset training; in terms of accuracy and running time, the comparison found that the 4:1 division ratio had a higher accuracy and shorter running time. Therefore, in this study, the training set and test set were randomly assigned with a 4:1 ratio. In the process of model evaluation, in order to avoid the influence of random errors, all algorithms were run 75 times, and the average recognition accuracy (including standard deviation) was used as the final evaluation index. Figure 8 shows the trend of loss and recognition accuracy of different models during training. Table 5 gives the average recognition accuracy and standard deviation of different models on the test set. Figure 8: Comparative analysis of loss and accuracy of different models in the training process. As shown in Figure 8, although the initial loss values of the four models were not at the same level, the overall trend of the loss changes during the training process was more similar, which was due to the fact that the different models were based on the traditional GoogLeNet as the basic architecture. As the iteration proceeded, the loss values of GoogLeNet improved based on the spatial attention mechanism and GoogLeNet improved based on the channel attention mechanism decrease occurring at a slightly faster rate than the traditional GoogLeNet decrease rate, whereas the GoogLeNet improved based on both the spatial and channel attention mechanisms developed in this study, as seen by the fastest decrease rate of the loss and was the first to reach stabilisation, which was related to the different models of the attention mechanisms introduced. After about 60 epochs, the losses of the different models did not continue to significantly drop but fluctuated within a fairly small range, indicating that the models had converged. In terms of the training accuracy, the overall trend of different models was highly correlated with the trend of the model loss. After convergence, for the training dataset, the recognition accuracies of the different models, except the traditional GoogLeNet, reached high levels, fluctuating above 99.8%. Although the differences between the different models were not significant on the training set, the differences were more pronounced when dealing with the test set. As shown in Table 5, the average accuracy of the traditional GoogLeNet model on the test set was 97.97%, with a standard deviation of 0.65%, whereas the channel and spatial attention models had accuracies of 98.72% and 98.44%, respectively, with a smaller standard deviation. Compared with the traditional GoogLeNet model and the improved model with different attention mechanisms, the developed GoogLeNet improved with spatial- and channel-based attention mechanisms had the highest average accuracy of 99.04% during testing. This indicates that the introduction of different attention mechanisms could improve the accuracy of the model to some extent. In addition, the experimental results from the test set show that the processing power of the channel-based classification model was more advantageous than the spatial-based classification model. Figure 9 compares the classification accuracy of four different models on the test set using a confusion matrix. Overall, most of the misdiagnosed samples appeared between 0 and 1 states, and the cause of misdiagnosis may have been a slight difference in the original data, and for most categories, the type of the sample could be fully identified. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Model** & \
\begin{tabular}{c} **Average Recognition** \\ **Accuracy** \\ \end{tabular} &
\begin{tabular}{c} **Standard Deviation** \\ \end{tabular} \\ \hline GoogLeNet & 97.97 & 0.65 \\ Spatial Attention–GoogLeNet & 98.72 & 0.57 \\ Channel Attention–GoogLeNet & 98.44 & 0.60 \\ Attention–GoogLeNet & 99.04 & 0.51 \\ \hline \hline \end{tabular}
\end{table}