Research on Recognition Method of Driving Fatigue State Based on Sample Entropy and Kernel Principal Component Analysis

In view of the nonlinear characteristics of electroencephalography (EEG) signals collected in the driving fatigue state recognition research and the issue that the recognition accuracy of the driving fatigue state recognition method based on EEG is still unsatisfactory, this paper proposes a driving fatigue recognition method based on sample entropy (SE) and kernel principal component analysis (KPCA), which combines the advantage of the high recognition accuracy of sample entropy and the advantages of KPCA in dimensionality reduction for nonlinear principal components and the strong non-linear processing capability. By using support vector machine (SVM) classifier, the proposed method (called SE_KPCA) is tested on the EEG data, and compared with those based on fuzzy entropy (FE), combination entropy (CE), three kinds of entropies including SE, FE and CE that merged with KPCA. Experiment results show that the method is effective.


Introduction
Driving fatigue is a phenomenon in which, due to continuous driving, drivers' ability of perception, judgment and operation appear to decrease [1]. Drivers are prone to driving fatigue after long driving, and if they keep driving, their limbs will be stiff, their attention will decrease and their judgment will decline. Driving fatigue may cause people to become delirious, and they may be prone to traffic accidents [2]. Therefore, an effective driving fatigue state recognition method is the key to construct the dangerous driving state warning system.
At present, a series of studies has been conducted on the recognition of driving fatigue status at home and abroad. Guo et al. [3] explored the correlation between ECG indicators and driving fatigue state based on ECG signals and constructed the driving fatigue state recognition model combined with the SVM classifier. Yang et al. [4] conducted research on driving fatigue recognition on the basis of the fusion of eye movement and pulse information. Zhao et al. [5] applied functional brain networks to establish a fatigue recognition model based on EEG data and graph theory methods. Zhao et al. [6] constructed a driving fatigue recognition model based on the human eye feature by using a concatenated convolutional neural network. To judge whether the driver felt fatigue, Zhang et al. [7] conducted research on driving fatigue recognition on the feature extraction of the wavelet entropy of EEG signals. Moreover, Chai and Naik et al. [8] used entropy rate bound minimization as a source separation technique, the autoregressive (AR) modeling as the feature extraction algorithm and the Bayesian neural network as the classification algorithm for driving fatigue recognition; they combined independent component by entropy rate bound minimization analysis (ICA-ERBM) and EEG feature extraction components, which have not been explored previously for fatigue classification. Zeng et al. [9] proposed to use deep convolutional neural networks and deep residual learning to predict the drivers' mental states from EEG signals; they also developed two mental state classification models that are the architecture of our CNN-based EEG classier called EEG-Conv and combining EEG-Conv with residual learning called EEG-Conv-R. Chai and Ling et al. [10] combined the AR modeling feature extractor with a sparse-deep belief networks (sparse-DBN) classifier to constructed a driving fatigue recognition model, which have not been explored previously for EEG-based driving fatigue classification. Hu et al. [11] conducted a driving fatigue recognition model by the combination of the feature set that consisted of sample entropy, fuzzy entropy, approximate entropy and spectral entropy and the gradient boosting decision tree (GBDT) through the use of three different classifiers.
The literature mentioned above has enriched and extended the research of fatigue recognition from different perspectives. EEG signals, with the highest sensitivity in driving fatigue detection and recognition and the highly correlated relationship with the driver's mental state, have been studied more deeply [12]. There are many ways to analyze EEG signals, such as time domain analysis, frequency domain analysis, multidimensional statistical analysis and nonlinear analysis [13]. However, the recognition accuracy of the driving fatigue state obtained by using these methods is still not satisfactory after the feature extraction of EEG signals. PCA and SVM were used to obtain better recognition accuracy based on motion imagination EEG signals in [14]. However, because of the nonlinear characteristics of EEG data, the internal model of the PCA is linear, the same with the relationship among the principal components. PCA will lose its effectiveness when the principal components of the study object are nonlinear. Therefore, this paper proposes a driving fatigue recognition method based on sample entropy and kernel principal component analysis. There are several advantages to using the sample entropy kernel principal component analysis (SE_KPCA) method. On the one hand, the recognition of driving fatigue state based on sample entropy (SE) [15] is more accurate. On the other hand, the result of dimension reduction in KPCA [16] is more positive and has a strong non-linear processing capability. On the basis of the above, a driving fatigue state recognition model is constructed with the combination of the support vector machine (SVM) [17] algorithm to achieve effective recognition of the driver's fatigue state.

Sample Entropy
The sample entropy (SE) calculation process is described as follows, given the original signal of length N, denote it by x(1), x(2), . . . , x(N), and define the m-dimensional vector: Calculate any two m-dimensional vectors: ] is the maximum difference between X m (i) and X m (j). Given a threshold r, calculate the total number of the maximum difference between any two elements that is less than the threshold: Define a ratio: B m i (r) is the ratio of C to the total; calculate its mean: where B m (r) is the proportion mean of the m-dimensional sequence. When the signal increases to m + 1-dimension, repeat Equation (1) to Equation (4), and calculate the proportion mean of the m + 1-dimensional sequence: Get the sample entropy of the sequence: When N is finite, Equation (7) can be expressed as follows: From Equation (8), it is known that the value of SanmEn is related to m and r. Pincus [18] pointed out that the value of m is generally taken as two, when r is set to be 0.1-to 0.25-times the standard deviation of the original EEG signal time series (0.1 to 0.25 SD; SD is the standard deviation). Thus, m is set as two, and r is set as 0.25 SD in this paper.

Basic Principles of PCA
Suppose that the m-times extracted data matrix of n variables X i , X 2 , . . . , X m is X = (X pq ) m * n . The main steps of PCA analysis [19,20] are as follows: 1.
Calculate the sample mean and standard deviation for each indicator X: 2. Normalize X pq and calculate its normalization matrix: 3.
Calculate the correlation coefficient matrix R according to the obtained standardized matrix Y = (Y pq ) m * n : R = (r pq ) mn , r qq = 1, r qk = r kq (12) 4. Get the eigenvalue of R, denoted as λ. Suppose λ 1 ≥ λ 2 ≥ . . . ≥ λ n > 0 and l 1 , l 2 , . . . , l n are the corresponding feature vectors. Determine the range of K according to the cumulative variance contribution as CVC > 90%, and define the CVC as: the K principal components are created, denoted as:

Basic Principles of KPCA
There are M samples in the input space, denoted as The nonlinear mapping function Φ is introduced to the algorithm, transforming the sample points in the input space x 1 , x 2 , . . . , x M into sample points in the feature space as Φ(x 1 ), Φ(x 2 ), . . . , Φ(x M ), and the hypothesis: Then, the covariance matrix in the feature space F is defined as: Therefore, the solving equation of PCA in the feature space is: λ is the eigenvalue, and v ∈ F\{0} is the eigenvector, so: Note that v can be expressed linearly by where a 1 , a 2 , . . . , a N is constant. Define an N * N matrix satisfying the Mercer condition, denoted as K: K is called the nuclear matrix, which can be obtained from Equation (16) to Equation (19) as follows: The required eigenvalues and eigenvectors are obtained by solving the formula Equation (21). The projection of the test sample on the F-space vector V k is: Supposed that Equation (15) is not valid. Then, the K in Equation (21) is replaced by K.
where l ij = 1 (for all i, j).

Kernel Function Methods
At present, there are several forms of kernel functions that can be chosen, as follows: 1.

4.
Multilayer perceptual (MLP) kernel function: The P-order polynomial kernel function, radial basis function and multilayer perceptual kernel function are used in the model of this paper.

EEG Data Processing Method Based on Sample Entropy and Principal Component Analysis
Based on the above discussion about the method proposed in this paper, the algorithm that combined sample entropy and principal component analysis (SE_PCA) can be divided into the following three steps:

1.
Collect the EEG signal, and preprocess it; then, extract the sample entropy characteristics of the data by the formula Equations (1) to (8), and obtain a matrix X m * n ; 2.
Take the matrix X m * n into the formula Equations (9) to (14), then calculate its principal component; 3.
Construct a model, and use SVM to classify.

EEG Data Processing Method Based on Sample Entropy and Kernel Principal Component Analysis
Based on the above discussion about the method proposed in this paper, the SE_KPCA algorithm can be divided into the following four steps:

1.
Collect the EEG signal, and preprocess the EEG signal; then, extract the sample entropy characteristics of the data by the formula Equations (1) to (8), and obtain a matrix X m * n ; 2.
Select the kernel function K(x, x i ), the matrix X m * n as an input of KPCA, and centralize it in high dimensional space; then, calculate matrix K according to Equation (23); 3.
Calculate the eigenvalues and eigenvectors of the matrix K, as well as its nonlinear principal component; 4.
Construct a model, and use SVM to classify.

Test Environment and Test Data
Test environment: The platform environment used in the experiment includes a static simulator (Beijing-China Joint Teaching Equipment Co., Ltd., ZY-31D vehicle driving simulator, Beijing, China), and this includes three 24-inch monitors and a software teaching system for driving simulations (ZM-601 V9.2). A 32-electrode EEG collecting cap, the computer system (windows 10 × 64), EEG collecting and preprocessing software (Neuroscan 3.2) and EEG analysis software (MATLAB R2014b) were used.
Test data description: The EEG signal data analyzed in this paper come from the EEG study, which simulated car driving training. Twenty five normal subjects were tested for the current fatigue level during the training, such as the sleep quality on the previous night, the diet on the day, etc., then two sets of experiment data were recorded by every subject, namely fatigue state and non-fatigue state. According to the precious experience in the fatigue-related experiment, each subject was asked to drive for 40 min without a break, then they were asked to take a questionnaire to check their states [21]. The EEG data are 32-electrode, 600 s time series at a sampling rate of 1000 Hz, which consisted of 300 s of rest (non-fatigue) and 300 s of fatigue. After collecting a person's EEG signal data, filtering and processing them (artifact removal, removal of eye movement interference, signal correction, etc. [21]) were conducted. This paper conducted two sets of experiments. The first one was taking some data from 10 individuals and 60 s for each person (the first 30 s in the non-fatigue state and the other 30 s in the fatigue state), which constructed a 600 * 30 data matrix (for which 600 is 600 s, 30 is the 30 electrodes), as shown in Figure 1. The other one was taking some data from 15 individuals and 60 s of each person, which constructed a 900 * 30 data matrix, as shown in Figure 2. At present, this paper merely compares the experimental results of 30 s, due to less data being able to reduce the time of experiment and the amount of data in 30 s being enough. However, the subsequent experiments would enlarge the selection of different time bands for testing.

Driving Fatigue State Recognition Test Based on SE_PCA
Firstly, the SE_PCA method was used to analyze the contribution ratio of the 30 electrode principal components. According to formula ∑ n q=1 λ q mentioned in Section 3.1, the contribution rate of the 30 electrode principal components was calculated as shown in Table 1, in which i represents the principal components (or principal elements) and C i represents the contribution rate. From Table 1, each principal element corresponds to two sets of contribution rate, and the former data are from the first experiment and the latter from the second experiment. In the first experiment, the cumulative contribution rate of the top 10 principal components reached 90.63%. As a result, the amount of principal components was reduced from 30 to 10. Similarly, the cumulative contribution rate of the top 14 principal components reached 95.08%, and the cumulative contribution rate of the top 23 principal components reached 99.10%. In the second experiment, the cumulative contribution rate of the top eight principal components reached 90.14%. As a result, the amount of principal components was reduced from 30 to eight. Similarly, the cumulative contribution rate of the top 13 principal components reached 95.17%, and the cumulative contribution rate of the top 23 principal components reached 99.12%.
Secondly, we selected the main component through Equation (13) >90%. This article mainly tests three kinds of situations where the contribution rates reach 90%, 95% and 99%, respectively. The corresponding characteristic variables in the three cases were 10, 14 and 23 in the first experiment; the corresponding characteristic variables in the three cases were 8, 13 and 23 in the second experiment. Finally, according to the three contribution rates, the accuracy of the recognition in driving fatigue was tested by the SVM classifier. This paper used a method based on k-fold cross-validation in which k = 3. Seventy percent of the data were used as a training set, then the other thirty percent of the data were used as a test set. The test results are shown in Tables 2 and 3. Compared with the driving fatigue recognition accuracy rates, which only used the sample entropy, when the contribution rate reached 0.99, the SE_KPCA method improved the recognition accuracy of the driving fatigue state compared with the SE method, and the time performance had also been reduced.

Driving Fatigue State Recognition Test Based on SE_KPCA
First of all, we analyzed the principal components contribution rates by the SE_KPCA method. For example, when the kernel function chose a P-order polynomial kernel function and the parameter was set as P = 2, the calculation results were as shown in Table 4. As we can see, each principal element corresponds to two contribution rates; the former data were from the first experiment, and the latter data were from the second experiment, the same for Tables 5 and 6.
Then, we selected the main component, and the cumulative contribution rate calculation was consistent with the PCA method. For example, the kernel function chose a P-order polynomial kernel function testing for three cases with contribution rates of 90%, 95% and 99%. In the first experiment, Table 4 shows the result when parameter P = 2, and the characteristic variables in the three cases were: 8, 12, 26. Table 5 shows the result when parameter P = 1, and the characteristic variables in the three cases were: 9, 14, 23. Table 6 shows the result when parameter P = 0.5, and the characteristic variables in the three cases were: 10, 14, 22. For the second experiment, Table 4 shows the result when parameter P = 2, and the characteristic variables in the three cases were: 7, 12, 25. Table 5 shows the result when parameter P = 1, and the characteristic variables in the three cases were: 8, 13, 23. Table 6 shows the result when parameter P = 0.5, and the characteristic variables in the three cases were: 9, 13, 21.  Last but not least, the three selected principal components for driving fatigue recognition accuracy were tested by the SVM classifier. The specific test was performed under three different principal component contribution rates by using the KPCA method of the P-order polynomial kernel function, radial basis function and multilayer perceptual kernel function, and every optimal parameters was obtained through multiple experiments. The test results are shown in Tables 7-9. The data test results of 15 people are shown in Tables 10-12. These tables also include the accuracy of the driving fatigue state recognition based on SE_PCA under the same contribution rates. Table 7. Comparison between the sample entropy kernel principal component analysis (SE_KPCA) (P-order) method and the SE_PCA method (10 individuals). The test results from Tables 7-12 show that the SE_KPCA method was better than the SE_PCA method at identifying and classifying driving fatigue. In particular, when KPCA's kernel functions chose a radial basis function with a parameter of 0.2 and a contribution rate of 0.9, the classification accuracy of the SE_KPCA method reached 98.33%, and the time performance was good. The subsequent experiments in this paper all used the radial basis function, and the parameter σ was 0.2, while the contribution rate was set as 0.9. Table 9. Comparison between the SE_KPCA (MPL) method and the SE_PCA method (10 individuals).

Comparison Test between SE_KPCA and the Driving Fatigue Recognition Method Based on Fuzzy Entropy/Combination Entropy
In order to verify the classification effect of the SE_KPCA method further, traditional methods of feature extraction were used to compare the sample entropy, fuzzy entropy (FE) [13,22] and combination entropy (CE) [16]. Take the samples of 10 and 15 individuals' EEG signals as an example; fuzzy entropy and combination entropy were used for feature extraction, and then SVM was applied to identify the driving fatigue state; the test results are shown from Figures 3-6. After the comparison and analysis of the figure, the conclusion was draw that SE_KPCA had significantly improved the classification recognition rate compared with the traditional sample entropy, fuzzy entropy and combination entropy, and the time performance was good.     • Extract the features of fuzzy entropy from the collected EEG signals according to the fuzzy entropy formula in the literature [22]; • Select the kernel function K(x, x i ); centralize the fuzzy entropy data in the high dimensional space, and then, calculate the matrix according to Equation (23); • Calculate the eigenvalues and eigenvectors of the matrix K ; • Calculate its nonlinear principal component.
(2) The EEG data processing method based on the KPCA and combination entropy (CE_KPCA): • Extract the features of the combination entropy from the collected EEG signals according to the combination entropy formula in the literature [21]; • Select the kernel function K(x, x i ); centralize the combination entropy data in the high dimensional space, and then, calculate the matrix according to Equation (23); • Calculate the eigenvalues and eigenvectors of the matrix K; • Calculate its nonlinear principal component.

Experimental Results
After verifying the validity of the SE_KPCA method in Section 5.4, this paper compares KPCA combined with fuzzy entropy (FE_KPCA) with KPCA combined with combination entropy (CE_KPCA). As shown from Figures 7-10, through the same method, the SVM was adopted for classification and identification. After comparing and analyzing all the figures, our conclusion is that the classification recognition rate of SE_KPCA was obviously higher than FE_KPCA and CE_KPCA, and the temporal performance was lower.    As shown from Figures 3-10, it can also be seen that FE_KPCA and CE_KPCA have no higher classification accuracy than traditional FE and CE, and the time performance is worse.

Conclusions
This paper studies the characteristics of EEG signals in two groups (fatigue state and non-fatigue state). Firstly, feature extraction of the EEG signal was conducted by applying sample entropy, then further feature extraction was made by using kernel principal component analysis, and the SVM classifier was used to classify and identify the two states of fatigue and non-fatigue. Through analysis and comparison of the experiment results that indicate when the kernel functions select the radial basis function, the classification recognition rate performs excellently. Besides, when compared with the traditional methods, the classification recognition rate is also significantly improved. This paper mainly researched the experiment results of the entropy, PCA and KPCA, but the subsequent experiments will introduce more methods for testing.