# Detection Model on Fatigue Driving Behaviors Based on the Operating Parameters of Freight Vehicles
## 3 Results and Discussion
### Discussion of Experimental Results  
In order to test the effectiveness of the fatigue driving behavior detection model based on the \(k\)-nearest neighbor algorithm, the model (referred to as Model 1) was compared with the existing fatigue driving behavior detection model based on the BP neural network (referred to as Model 2). Both models considered the influence of the number of different training samples and other parameters on the detection accuracy. 1. Analysis of the experimental results Model 1  
The program is developed with Python to realize the calculation of the fatigue driving detection model based on the \(k\)-nearest neighbor algorithm. According to the data obtained above, the parameters of the model can be known: the number of test sample \(l=79\), with the number of training sample \(q\leq 317\), and the number of vehicle operating parameters significantly affected by fatigue degree \(m=9\). The value of \(k\) is usually not greater than 20, and the values are 1, 3, 5, 7, 9, 11, 13, 15, 17 and 19, respectively. The accuracy of  
Figure 1: Vehicles’ driving path. fatigue driving behavior detection that changes with the number of training samples is calculated and shown in Figure 2. The number range of training samples corresponding to the maximum detection accuracy is shown in Table 4.  
Figure 2 and Table 4 show that when \(k\) values (smaller values) are 1 and 3, the detection accuracy fluctuates greatly with the change of the number of training samples, and the accuracy is relatively low. When \(k\) values (larger values) are 5, 7, 9, 11, 13, 15, 17, and 19, and the number of the training samples isgreater than 70, the detection accuracy improves as the number of training samples increase and, until the number of training sample is greater than 200, the accuracy reaches more than 70.0% with a stable trend. When the \(k\) value is 7 with the number range of training samples of 284-306, the accuracy of fatigue driving detection reaches the maximum value of 75.9%. Therefore, the \(k\) value of the model should be set to 7, and when the ratio of the test set to the training set is between (2:7)-(2:8), the accuracy is high with strong stability so that requirements for training samples are low. When the detection accuracy reaches the maximum, the detection results of each fatigue degree are shown in Table 5. By calculating the _precision_, _true rate_ (_TPR_), _and true \begin{table}
\begin{tabular}{c c c} \hline \hline \multirow{2}{*}{\(k\)**Value**} & **Number of Training Sample Corresponding to** & \multirow{2}{*}{**Detection Accuracy**} \\  & **the Maximum Detection Accuracy** & \\ \hline
1 & 56 & 63.3\% \\
3 & 265 & 72.3\% \\
5 & 295–306 & 74.7\% \\
7 & 284–306 & 75.9\% \\
9 & 303–306 & 75.9\% \\
11 & 191–199, 277–306 & 72.2\% \\
13 & 277–306 & 73.4\% \\
15 & 246–306 & 73.4\% \\
17 & 248–306 & 73.4\% \\
19 & 248–249 & 75.9\% \\ \hline \hline \end{tabular}
\end{table} 
Table 4: The maximum value of the fatigue driving detection accuracy when \(k\) takes different values and the corresponding number of training samples. Figure 2: Accuracy of fatigue driving behavior detection with the number of training sample when \(k\) takes different values. negative rate (TNR)_ of each type of fatigue degree prediction, the algorithm is evaluated (see Table 6). As can be seen from Table 6, when the driver is alert, the three index values of the evaluation algorithm are all greater than or equal to 87.5%, indicating that the algorithm can distinguish the driver's alert state and non-alert state well. When the driver is in the state of fatigue and severe fatigue, the \(TNR\) is larger, while the _Precision_ and \(TPR\) are smaller, indicating that the algorithm has a higher probability of correctly identifying the state of non-fatigue or non-severe fatigue, but a lower probability of correctly identifying the state of certain fatigue or severe fatigue. In addition, combined with Table 5, it can be seen that the fatigue state and severe fatigue state are easily confused in detection.