## 5 The Application in Fatigue Detection
Nevertheless, we still feel that the cost is acceptable. Next, we analyzed the performance of the detection algorithm from the receiver operation characteristic curve (ROC) [34]. The ROC curve is used to judge whether the detection model is good or bad, mainly from the curve shape and AUC (area under the curve). If the curve is closer to the upper left corner, the better the detection effect is. On the contrary, it means that the detection effect of the model is worse. AUC refers to the area under the ROC curve, which can reflect the diagnostic value of the detection model. The closer the AUC value is to 1, the better the performance of the model is. Figure 6 shows the ROC curves of several algorithms. From Figure 8, we can see that, on the whole, the ROC curves of the previous algorithms are more inclined to the upper left corner, indicating that they are better detectors. Among them, the algorithm proposed in this paper has the best bias, which is obviously better than other detection methods. In terms of AUC, the offline area of this method is larger, reaching 0.992, which is higher than the other three methods. In conclusion, the advantages of the proposed method can be seen from the ROC curve. In the detection method proposed in this paper, there is a certain randomness in the construction of base classifiers and the optimization of weights. In order to verify the stability of the algorithm, we used SQGA to do 50 Monte Carlo simulation experiments and analyzed the experimental results with a box diagram. In the same way, we made a box diagram for bagging, boosting and vote, respectively. We counted the Monte Carlo simulation experiments' false positive rates, false negative rates and detection accuracy of these methods, respectively. The experimental results are shown in Figures 9-11. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Methods** & **Normal** & **False** & **False** & **False** & **Accuracy (\%)** & **Train Time (s)** & **Test Time (s)** \\  & **Detection** & **Positive Rate** & **Detection** & **Negative** & **Accuracy (\%)** & **Train Time (s)** & **Test Time (s)** \\  & **Number** & **(\%)** & **Number** & **Rate (\%)** & & & \\ \hline SVM & 946 & 5.40 & 182 & 9.00 & 94.00 & 3.2 & 0.13 \\ Bagging & 962 & 3.80 & 187 & 6.50 & 95.75 & 1.4 & 0.33 \\ Boosting & 964 & 3.60 & 186 & 7.00 & 95.83 & 2.1 & 0.35 \\ Proposed & 988 & 1.20 & 194 & 3.00 & 98.50 & 3.5 & 0.36 \\ method & & & & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Experimental results of fatigue detection. The horizontal line in the box diagram represents the statistical median, the height of the box represents the distribution interval, and '+' stands for abnormal value in different methods. From the experimental results, we can clearly see that the height of the proposed method box is the lowest among the three statistics, which shows that the method proposed in this paper is very stable. Compared with bagging and boosting, the vote method can also achieve better stability, which also reflects that the heterogeneous integration method in this paper can increase the diversity of base classifiers. The experimental results show that the SQGA can not only obtain good search results (minimum false positive rate, false negative rate and maximum detection accuracy) but also has good convergence characteristics and minimal outliers. Figure 8: ROC curves of different detection methods. Figure 10: Box diagram of false negative rate. Figure 9: Box diagram of false positive rate. In reality, there may be more fatigue happening during some periods and less during other periods. Corresponding to the dataset, it shows the proportion of normal samples and fatigue samples. This also poses some challenges to the training data collection process. In theory, the larger the dataset, the better the detection effect of the model. However, it is also possible that in the early detection stage, the number of fatigue events collected is relatively small. In this case, can this detection model perform well?