## 4 Discussion  
To illustrate the relationship between true positive rate and false positive rate in an intuitive way, we used a receiver operating characteristic (ROC) graph to evaluate the performance of the proposed method [25,26]. The area under the curve of the ROC (AUC) was calculated to assess the classification performance. Figure 6 presents the ROC curves for cubic SVM (a) and quadratic SVM (b). The y-axis represents the true positive rate and the x-axis represents the false positive rate. More specifically, a perfect result with no misclassified points is a right angle to the top left of the plot. A poor result that is no better than random is a line at 45 degrees. The AUC is a measure of the overall quality of the classifier. Larger AUC values demonstrate better classifier performance [25]. In Figure 6, the two ROC curves for cubic SVM classifier (a) and quadratic SVM classifier (b) show the curves plotted in the upper left, which indicates that these two classifiers achieve good performance with the SampEn feature. The result also shows that the ROC curve for the cubic SVM classifier achieves the best upper left curve compared to the quadratic SVM classifier. Additionally, Figure 6 shows that these two classifiers with the SampEn feature achieve the best performance result with the highest AUC of 1. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline
**Classifiers** & **TP** & **FN** & **FP** & **TN** & **Accuracy (\%)** & **Sensitivity (\%)** & **Specificity (\%)** & **Precision (\%)** \\ \hline LR & 163 & 17 & 16 & 164 & 90.8\% & 90.6\% & 91.1\% & 91.1\% \\ Linear SVM & 161 & 19 & 17 & 163 & 90.0\% & 89.4\% & 90.6\% & 90.4\% \\ Quadratic SVM & 171 & 9 & 4 & 176 & 96.4\% & 95.0\% & 97.8\% & 97.7\% \\
**Cubic SVM** & **172** & **8** & **2** & **178** & **97.2\%** & **95.6\%** & **98.9\%** & **98.9\%** \\ Fine KNN & 167 & 13 & 1 & 179 & 96.1\% & 92.8\% & 99.4\% & 99.4\% \\ Medium KNN & 158 & 22 & 4 & 176 & 92.8\% & 87.8\% & 97.8\% & 97.5\% \\ Cubic KNN & 158 & 22 & 7 & 173 & 91.9\% & 87.8\% & 96.1\% & 95.8\% \\ \hline \end{tabular}
\end{table} 
Table 1: Performance analysis of the KNN, SVM, and LR machine learning algorithms on the testing dataset (The best performance result is indicated in bold). Figure 5: Performance plot of various classifiers. To simulate cross-subject driver fatigue recognition, we carried out leave-one-subject-out cross-validation on our dataset. In the leave-one-subject-out cross-validation setting, the data from nine subjects were pooled together and used as the training data to train the classifiers, and the data from the remaining subject were held out from the dataset and reserved as test data. The recognition accuracy was then evaluated on the remaining subject. This procedure was repeated for all 10 subjects. Usually, the leave one-subject-out cross-validation allows us to assess the adaptability of previously trained classifiers on new individuals. Table 2 shows the accuracy of leave-one-subject-out fatigue recognition across multiple machine learning algorithms. Figure 7 shows confusion matrices for leave-one-subject-out fatigue recognition with fine KNN. Performance measures (sensitivity, specificity, precision) of leave-one-subject-out fatigue recognition are presented in Figure 8. It is worth noting that for all 10 subjects, the highest average accuracy for driving fatigue of 97.8% is fine KNN with one neighbor using Euclidean distance and equal distance weight.