# Feature Mining and Sensitivity Analysis with Adaptive Sparse Attention for Bearing Fault Diagnosis
## 4 Model Analysis and Comparative Validation
### Weight Sharing and Weight Independent Comparison Test  
Additionally, in order to study the influence of whether the weights in the convolutional layers of each sequence are shared in the performance of the model, two sets of control experiments are set up. The network model in Section 3.2 serves as the foundation for all experimental model structures, but the attention module is not included. Adjust the corresponding network model and conduct multiple experiments. Referring to [20], the dataset is preprocessed and its parameters are shown in Table 5. Further, each input sample is divided into 64 segments of equal length, and each segment of the signal contains 128 data points. The convolution parameters of each sequence in the first group of experiments are shared, denoted as CPS (Convolution parameter sharing); in the second group of experiments, the convolution parameters of each sequence are independent, denoted as CPI (Convolution parameter independence). The number of experimental data points in both groups is 8192, and the experimental dataset is under the condition of 0 hp load, including 10 fault settings shown in Table 3. In order to evaluate the model performance in various aspects, the network was trained using data from 0 hp load, and cross-case diagnostic tests were carried out under 3 hp load. Each group of experiments is repeated 10 times to reduce the impact of the randomness of the test results. The fault diagnosis accuracy and cross-working condition diagnosis performance are shown in Figure 6. The diagnostic accuracy is given in the manner shown in Equation (21).  
\[accuracy=\frac{n_{TP}+n_{TN}}{n_{TP}+n_{TN}+n_{FP}+n_{FN}}\times 100\% \tag{21}\]  
where \(n_{TP}\) is the number of true positive samples, \(n_{TN}\) is the number of true negative samples, \(n_{FP}\) is the number of false positive samples, \(n_{FN}\) is the number of false negative samples.  
\begin{table}
\begin{tabular}{c c c c c} \hline
**Load** & **Speed** & **IF** & **BF** & **OF** \\ \hline
0 hp & 1797 [rpm] & 162.19 [Hz] & 141.17 [Hz] & 107.36 [Hz] \\
3 hp & 1730 [rpm] & 156.14 [Hz] & 135.90 [Hz] & 103.36 [Hz] \\ \hline \end{tabular}
\end{table}
Table 4: Test load and bearing fault characteristic frequency.  
\begin{table}
\begin{tabular}{c c c c} \hline
**Code of the Working Condition** & **The Fault Location** & **The Fault Size** & **Class Label** \\ \hline Health & Health & 0 [mil] & 1 \\ IF7 & IF & 7 [mil] & 2 \\ BF7 & BF & 7 [mil] & 3 \\ OF7 & OF & 7 [mil] & 4 \\ IF14 & IF & 14 [mil] & 5 \\ BF14 & BF & 14 [mil] & 6 \\ OF14 & OF & 14 [mil] & 7 \\ IF21 & IF & 21 [mil] & 8 \\ BF21 & BF & 21 [mil] & 9 \\ OF21 & OF & 21 [mil] & 10 \\ \hline \end{tabular}
\end{table}
Table 3: Test fault setting.  
\begin{table}
\begin{tabular}{c c c c} \hline
**Parameters** & **Value** \\ \hline Number of Samples & 500 (100\%) \\ Number of train data & 300 (60\%) \\ Number of validation data & 100 (20\%) \\ Number of test data & 100 (20\%) \\ Number of features & 8192 \\ Number of Classes & 10 \\ \hline \end{tabular}
\end{table}
Table 5: Summary of the dataset parameters.  
As can be seen from Figure 6 and Table 6, the bearing data features are relatively clear, and the model classification performance can reach 100%, but the cross-working condition diagnosis performance of the CPI method is significantly better than that of the CPS method. Hence, the diagnostic generalization of the independent method of each sequence convolution parameter is better.