# Detection Model on Fatigue Driving Behaviors Based on the Operating Parameters of Freight Vehicles
## 3 Results and Discussion
### Discussion of Experimental Results
There are two reasons for this result. First, based on the videos, the scoring method is used to evaluate the driver's fatigue state with subjective factors. Second, the vehicle operating data of the fatigue state and severe fatigue state have no significant difference. On the whole, the model test results are reasonable. 2. Analysis of the experimental results Model 2  
The program is developed with Matlab to realize the calculation of the fatigue driving detection model based on the BP neural network (see Figure 3). From the data obtained above, the parameters of the model can be known: the number of the test sample \(l=79\), with the number of training sample \(q\leq 317\). The number of input layer nodes (vehicle operating parameters), the number of output nodes (fatigue degree), the number of hidden layer nodes, and the learning efficiency are set as \(9\), \(3\), \(midnum\), and \(0.1\), respectively. The neural network structure of \(9-midnum-3\) is adopted, and the training times are set as \(10\), \(50\), \(100\), \(200\), and \(500\), respectively [37]. The random number between (\(-1\),\(1\)) is selected as the initial value of connection weight among the neurons of the input layer, hidden layer, and output layer, as well as the initial value of the threshold values of the hidden layer and output layer [38,39]. The Sigmoid activation function is used as the excitation function of the hidden-layer neurons. Referring to the constraints of the number setting of the hidden-layer nodes in the BP neural network algorithm, it is determined that the maximum and minimum numbers of nodes were \(7\) and \(3\), respectively. Therefore, the number range of the hidden-layer nodes is \(3\)-\(7\)[40]. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & _Precision_ & _TPR_ & _TNR_ \\ \hline Alert & 87.5\% & 87.5\% & 92.9\% \\ Fatigue & 62.1\% & 75.0\% & 79.2\% \\ Severe fatigue & 80.7\% & 67.7\% & 88.6\% \\ \hline \hline \end{tabular}
\end{table} 
Table 6: \(k\)-nearest neighbor algorithm evaluation (the test results when the test accuracy reaches the maximum). \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & & \multicolumn{3}{c}{**Prediction**} \\ \cline{3-5}  & & **Alert** & **Fatigue** & **Severe Fatigue** \\ \hline \multirow{3}{*}{Actual} & Alert & 21 & 3 & 0 \\  & Fatigue & 1 & 18 & 5 \\ \cline{1-1}  & Severe fatigue & 2 & 8 & 21 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Confusion matrix based on the \(k\)-nearest neighbor algorithm (the test results when the test accuracy reaches the maximum). Under the premise of setting the training times as 10, 50, 100, 200 and 500, respectively, the different numbers of hidden layer nodes are taken to obtain the accuracy of fatigue driving detection with the different ratios of training sample and test sample (see Figures 4-8). No matter what the value of the training time is, when the detection accuracy reaches the maximum, the number of hidden layer nodes is 7. Therefore, the number of hidden layer nodes is determined to be 7. In addition, the model requires higher training data. Although the ratios of the test sample to the training sample are at 4:6, 3:7, and 2:8, the detection accuracy is above 70%, yet among these ratios, the detection accuracy fluctuates greatly. When the training times (smaller values) are 10 or 50 (see Figures 4 and 5), the detection accuracy is 75.9%. However, the fluctuation is large, the ratio of training samples to detection samples is high, and the reliability of the model is poor. When the training times are 100 or 200 (see Figures 6 and 7), the detection accuracy fluctuates greatly at first, and then it will fluctuate between 60.0-75.9% with the number of training sample increasing. However, there are still some large sudden changes in the intermediate detection accuracy, resulting in poor reliability. When training times are 500 (see Figure 8), the accuracy is generally stable and fluctuates between 60.0-75.9%.