Optimal Threshold Determination for Discriminating Driving Anger Intensity Based on EEG Wavelet Features and ROC Curve Analysis

Ping Wan 1,2,3, Chaozhong Wu 1,2, Yingzi Lin 3 and Xiaofeng Ma 1,2,* 1 Intelligent Transport Systems Research Center, Wuhan University of Technology, Wuhan 430063, China; pingw04@163.com (P.W.); wucz@whut.edu.cn (C.W.) 2 Engineering Research Center for Transportation Safety, Ministry of Education, Wuhan 430063, China 3 Intelligent Human-Machine Systems Laboratory, Northeastern University, Boston, MA 02115, USA; yilin@coe.neu.edu * Correspondence: maxiaofeng@whut.edu.cn; Tel.: +86-27-8658-2280


Introduction
Driving anger, called "road rage", is a special emotion caused by pressure or frustration from daily life or from bad traffic situations and discourteous behaviors from surrounding drivers [1].Road rage has become a more and more common issue affecting traffic safety all over the world.According to a report from American Automobile Association in 2009, 5%-7% of 9282 surveyed drivers were perpetrators of road rage, and professional drivers such as truck and bus drivers reached 30% [2].Particularly, in China, a survey of 9620 people in 2008 showed that about 60.72% of drivers had "road rage" experiences [3].Anger has a negative impact on perception, identification, decision and volition process while driving, which causes driving performance to degrade finally [4].Moreover, there exists a strong relationship between anger, aggression behavior and reported traffic accidents [5].Hence, an angry driver is inclined to make more mistakes and lapses or perform more violations and become more likely to be involved in a traffic accident [6].Therefore, driving anger detection/warning method should be designed for effective intervening to address road rage before threatening traffic safety.
Currently, except for facial expression, voice and body posture, physiology-based recognition of emotion has gradually become a hot topic as physiological signals, which can reflect human emotions objectively are spontaneous and hard to be controlled [7,8].Wang et al. [9] proposed an auxiliary dimension model and a factorization model using some physiological features such as blood volume pulse (BVP), skin conductance (SC), respiration rate (RR) and finger temperature (FT), to identify driver multiple emotions including anger which was induced by different guidance voices and driving courses.Katsis et al. [10] utilized other physiological features including facial electromyography (EMG), electrocardiogram (ECG), respiration, and electrodermal activity (EDA) in simulated racing environment to classify car-racing drivers' emotion states including high stress, low stress, euphoria and dysphoria by decision tree and Naïve Bayesian classifier.It appears that electroencephalogram (EEG) may be the most reliable indicator for emotion recognition because it can record electric potential from human scalp, closely associated with mental and physical activities when compared with other physiological features listed above [11].Recently, except for statistics-based features in time domain [12], energy-based and entropy-based features of EEG have gradually been applied a lot for human emotion recognition.Choi et al. [13] used power change of the ratio of delta (δ) to beta (β) waves of EEG before and after watching scary film chips to conduct fear evaluation.Schaaff et al. [14] recognized three different emotions including pleasant, neutral, and unpleasant by support vector machine (SVM), based on EEG characteristics such as peak alpha (α) frequency and α power.Moreover, in transportation field, Wang et al. [15] extracted Shannon entropy of EEG in α wave to detect driving fatigue danger in real time.Fu et al. [16] utilized power spectrum of EEG in θ, α and β wave, combined with root mean square of EMG and mean frequency power of respiration signal to detect driver fatigue state.Chai et al. [17,18] explored a classification model of driver fatigue and alert states using power spectral density (PSD) and autoregressive features of EEG signal after source separation by independent component analysis of entropy rate bound minimization.Summarily, those energy-based and entropy-based features of EEG are mainly based on power spectral analysis by fast Fourier transform (FFT) which suppose that the EEG signal is stationary within time window for analysis.However, EEG signal is considerably non-stationary in essence, which makes it difficult to obtain its stable statistical features in both time and frequency domain [19].Recently, wavelet transform has been employed in EEG signal analysis for detecting epilepsy [20], obstructive sleep apnea [21], and driver drowsiness [22].Good time resolution can be obtained by using wavelet transform for high-frequency signal while good frequency resolution for low-frequency signal, which can offer a multi-resolution time-scale representation of the signal.Therefore, wavelet transform approach can be used to study complex and non-stationary signals like EEG.
To date, most of emotion induction in those studies is based on video, music, pictures or elicitation scenario in driving simulator under laboratory condition, which may limit the generalizability because of individual cultural background or personal preference.In addition, the elicited emotion under laboratory condition is less likely to be valid as that elicited in real traffic environment, due to some demand characteristics and social desirability.Although a few researches on physiological features including BVP, SC and ECG have been conducted for driving anger, few researches on EEG features have been conducted for driving anger, especially in real traffic environment.More importantly, few of the foregoing literatures have put emphasis on definite determination of threshold of a certain emotion (e.g., anger), especially different intensity of the emotion when establishing classifier algorithm, which is not enough for effective intervening for road rage in advance in application.
Aimed at those, a high-arousal anger elicitation method is firstly conducted through stimulation of specific road events that naturally occur in real traffic environment.Secondly, EEG features in wavelet domain are extracted for discriminating driving anger states with different intensity.Finally, ROC curve analysis method is proposed to determine the optimal thresholds of the features for the different anger states.

Participants
Thirty private car drivers were recruited from Wuhan, China to complete on-road experiments.As males are more inclined to be involved in angry driving than females [23], only male subjects were chosen to carry out the experiments in order to maximize the statistical power.The average age of the subjects was 38.6 years, with a standard deviation of 5.6 years.Meanwhile, the average driving experience of the subject was 10.2 years, with a standard deviation of 4.8 years.All subjects were medically checked to be in good physiological and psychological condition, which is of importance when studying their EEG features.Each subject was paid for 300 RMB (Chinese currency) for completing the experiment.Additionally, an observer with rich driving experience was recruited to be seated in co-driver position to record the subjects' self-report of emotion state, and to assure the safety during whole experiments.

Apparatus
As shown in Figure 1a, an automatic transmission car was used as a test vehicle for the on-road experiments.The subjects' EEG signals were collected by NeuroScan4.5 acquisition system, with a sampling rate of 1000 Hz.It consisted of a 32-channel-electrode cap, a NuAmp amplifier and acquisition software (see Figure 1b).Moreover, three HD cameras installed on front windshield of the test vehicle (see Figure 1c) were implemented to record traffic environment (road events) ahead, the subjects' facial/voice expression and their rough maneuver behaviors including operation frequency and amplitude of steering wheel, gear lever and gas/brake pedal, respectively.The overall sketch of the apparatus system is shown in Figure 1d.features in wavelet domain are extracted for discriminating driving anger states with different intensity.Finally, ROC curve analysis method is proposed to determine the optimal thresholds of the features for the different anger states.

Participants
Thirty private car drivers were recruited from Wuhan, China to complete on-road experiments.As males are more inclined to be involved in angry driving than females [23], only male subjects were chosen to carry out the experiments in order to maximize the statistical power.The average age of the subjects was 38.6 years, with a standard deviation of 5.6 years.Meanwhile, the average driving experience of the subject was 10.2 years, with a standard deviation of 4.8 years.All subjects were medically checked to be in good physiological and psychological condition, which is of importance when studying their EEG features.Each subject was paid for 300 RMB (Chinese currency) for completing the experiment.Additionally, an observer with rich driving experience was recruited to be seated in co-driver position to record the subjects' self-report of emotion state, and to assure the safety during whole experiments.

Apparatus
As shown in Figure 1a, an automatic transmission car was used as a test vehicle for the on-road experiments.The subjects' EEG signals were collected by NeuroScan4.5 acquisition system, with a sampling rate of 1000 Hz.It consisted of a 32-channel-electrode cap, a NuAmp amplifier and acquisition software (see Figure 1b).Moreover, three HD cameras installed on front windshield of the test vehicle (see Figure 1c) were implemented to record traffic environment (road events) ahead, the subjects' facial/voice expression and their rough maneuver behaviors including operation frequency and amplitude of steering wheel, gear lever and gas/brake pedal, respectively.The overall sketch of the apparatus system is shown in Figure 1d.

Driving Scenario Design
In order to induce anger as much as possible, a special route including busy parts across Wuchang and Hankou Districts of Wuhan was selected for on-road experiments (see Figure 2a).The test route with 53 kilometers consists of 45 signalized intersections, three large-scale business districts, two tunnels, two expressways and 59 pedestrian crosswalks.On the test route, the subjects would often meet anger elicitation events such as jaywalking, weaving/cutting in line, traffic congestion and red light waiting which randomly and naturally occurred (see Figure 2b), especially during morning rush hours.Hence, 30 subjects were required to depart at approximately 8:00 a.m. to conduct the experiment after one-hour preparation including EEG equipment configuration and driving practice.In order to enhance the induction effect, the subjects were promised to get extra paid with 10 RMB/min if they complete the whole experiment ahead of the basic time (110 min), which is proved to provide a little pressure for accomplishment.

Driving Scenario Design
In order to induce anger as much as possible, a special route including busy parts across Wuchang and Hankou Districts of Wuhan was selected for on-road experiments (see Figure 2a).The test route with 53 kilometers consists of 45 signalized intersections, three large-scale business districts, two tunnels, two expressways and 59 pedestrian crosswalks.On the test route, the subjects would often meet anger elicitation events such as jaywalking, weaving/cutting in line, traffic congestion and red light waiting which randomly and naturally occurred (see Figure 2b), especially during morning rush hours.Hence, 30 subjects were required to depart at approximately 8:00 a.m. to conduct the experiment after one-hour preparation including EEG equipment configuration and driving practice.In order to enhance the induction effect, the subjects were promised to get extra paid with 10 RMB/min if they complete the whole experiment ahead of the basic time (110 min), which is proved to provide a little pressure for accomplishment.

Experiment Procedure
Firstly, an informed consent agreement explaining experiment requirements was signed by each subject.Note that all subjects are not allowed to violate any traffic rule, especially speeding.Secondly, after NeuroScan4.5 acquisition system was worn and configured adequately, the subjects conducted a ten-minute driving practice to get used to the equipment and the test vehicle before formal experiment.Thirdly, Every two minutes during the formal experiment or any moment the elicitation events happened on the test route, the observer evaluated the subject's emotion state based on his facial expression, voice and driving behavior such as steering wheel and gear lever movement by a seven-point scale from 0 (not at all) to 6 (very much).Apart from the evaluation report from the observer, which is used as auxiliary evidence for classifying the subject's anger state, the subject was also required to immediately evaluate his anger state by the seven-point scale according to the video replay from the three HD cameras after completing the experiment.It is noted that the experiments on the subjects complied with Chinese law on scientific research.

Anger Intensity Labeling
According to evaluation about the subjects' emotion state during the experiments from both the subject and the observer, anger emotion was indeed induced by the elicitation events.In order to study EEG spectral features under different driving anger states, it is necessary to label different anger intensity in terms of the anger levels self-reported by all subjects.In this study, the subject's self-report levels will be adopted if evaluation difference of emotion levels between the subject and the observer is less than 2. Otherwise, a more experienced driver will be employed to evaluate the subject's emotion level based on the video replay captured by Monitor video camera system.Then, driving anger states were divided into 4 categories including none anger state (anger level < 1), low

Experiment Procedure
Firstly, an informed consent agreement explaining experiment requirements was signed by each subject.Note that all subjects are not allowed to violate any traffic rule, especially speeding.Secondly, after NeuroScan4.5 acquisition system was worn and configured adequately, the subjects conducted a ten-minute driving practice to get used to the equipment and the test vehicle before formal experiment.Thirdly, Every two minutes during the formal experiment or any moment the elicitation events happened on the test route, the observer evaluated the subject's emotion state based on his facial expression, voice and driving behavior such as steering wheel and gear lever movement by a seven-point scale from 0 (not at all) to 6 (very much).Apart from the evaluation report from the observer, which is used as auxiliary evidence for classifying the subject's anger state, the subject was also required to immediately evaluate his anger state by the seven-point scale according to the video replay from the three HD cameras after completing the experiment.It is noted that the experiments on the subjects complied with Chinese law on scientific research.

Anger Intensity Labeling
According to evaluation about the subjects' emotion state during the experiments from both the subject and the observer, anger emotion was indeed induced by the elicitation events.In order to study EEG spectral features under different driving anger states, it is necessary to label different anger intensity in terms of the anger levels self-reported by all subjects.In this study, the subject's self-report levels will be adopted if evaluation difference of emotion levels between the subject and the observer is less than 2. Otherwise, a more experienced driver will be employed to evaluate the subject's emotion level based on the video replay captured by Monitor video camera system.Then, driving anger states were divided into 4 categories including none anger state (anger level < 1), low anger state (1 ≤ anger level < 3), moderate anger state (3 ≤ anger level < 5) and high anger state (anger level ≥ 5).Hence, 841 anger-related instances and 698 neutral (considered to be none anger) instances, were obtained to be analyzed for this study.The number distribution of the anger relevant instances is shown in Figure 3. Furthermore, that a great number of medium and high anger emotion were induced, verifies that the anger induction method proposed in this study is viable.
Information 2016, 7, 52 5 of 17 anger state (1 ≤ anger level < 3), moderate anger state (3 ≤ anger level < 5) and high anger state (anger level ≥ 5).Hence, 841 anger-related instances and 698 neutral (considered to be none anger) instances, were obtained to be analyzed for this study.The number distribution of the anger relevant instances is shown in Figure 3. Furthermore, that a great number of medium and high anger emotion were induced, verifies that the anger induction method proposed in this study is viable.

Signal Preprocessing of EEG
Because the designed experiments were conducted in real traffic environment, the raw EEG data was mixed with numerous noises, among which the high frequency noise is mainly due to power frequency noise while the low frequency noise is mainly due to respiration, heart beats (ECG), muscular activity (EMG), especially eye movements (EOG).Currently, there are many approaches such as independent component analysis [24,25] and semi-local Gaussian processes [26] to remove those artifacts.However, EEG signal is a kind of complex and non-stationary signal, then, the artifacts removal of EEG signal can be taken as follows: (1) Filter the contaminated EEG signal using a band pass filter with cutoff frequencies of 0.5 Hz and 35 Hz which are frequency range of normal EEG signal; (2) Remove stubborn artifacts whose frequency are also overlapped with that of normal EEG signal like EOG signal using discrete wavelet transform and a wavelet based threshold method [27,28] which will be explained in the following section.Additionally, based on the survey from the subjects, their anger level can be maintained during the first 3~6 seconds after stimulation of the anger elicitation events, then it goes down if no more elicitation events happen.Therefore, EEG signals lasting for 4.5 seconds were selected for the research on different driving anger states.

Artifact Removal Based on Discrete Wavelet Transform
It is noted that wavelet transform is very suitable for frequency analysis of EEG signals.Moreover, any finite time-domain signal in discrete domain can be expressed according to a mother wavelet () t (2 ), , For any time-domain signal () St , it can be expressed in terms of the above wavelets at level j as ,, ( ) ( ) ( ) ( ) ( ) where,   () and   () are the approximate and detailed coefficients at level j, respectively, and these coefficients can be calculated using filter bank approach [29].

Signal Preprocessing of EEG
Because the designed experiments were conducted in real traffic environment, the raw EEG data was mixed with numerous noises, among which the high frequency noise is mainly due to power frequency noise while the low frequency noise is mainly due to respiration, heart beats (ECG), muscular activity (EMG), especially eye movements (EOG).Currently, there are many approaches such as independent component analysis [24,25] and semi-local Gaussian processes [26] to remove those artifacts.However, EEG signal is a kind of complex and non-stationary signal, then, the artifacts removal of EEG signal can be taken as follows: (1) Filter the contaminated EEG signal using a band pass filter with cutoff frequencies of 0.5 Hz and 35 Hz which are frequency range of normal EEG signal; (2) Remove stubborn artifacts whose frequency are also overlapped with that of normal EEG signal like EOG signal using discrete wavelet transform and a wavelet based threshold method [27,28] which will be explained in the following section.Additionally, based on the survey from the subjects, their anger level can be maintained during the first 3~6 seconds after stimulation of the anger elicitation events, then it goes down if no more elicitation events happen.Therefore, EEG signals lasting for 4.5 s were selected for the research on different driving anger states.

Artifact Removal Based on Discrete Wavelet Transform
It is noted that wavelet transform is very suitable for frequency analysis of EEG signals.Moreover, any finite time-domain signal in discrete domain can be expressed according to a mother wavelet ψ(t) and a corresponding scaling function φ(t).The scaled and shifted version of the mother wavelet is expressed as the following [11]: For any time-domain signal S(t), it can be expressed in terms of the above wavelets at level j as where, s j (k) and d j (k) are the approximate and detailed coefficients at level j, respectively, and these coefficients can be calculated using filter bank approach [29].
As the features extracted from the wavelet decomposition mostly depend on the type of mother wavelet.According to literature [30], we know that the Daubechies family of wavelets is appropriate to decompress the time domain signal because of a compact support with relatively more number of vanishing moments from the family.Generally, the mother wavelet can be denoted with dBN (N = 1, 2, . . ., 10) in Daubechies family.As the detected scale of EEG signal decreases along with the decrease value of N, it is necessary to select a suitable scale of the mother wavelet.It is verified that dB5 is the most adequate for EEG signal decomposing by repeating testing in this study.
It is noted that the correlation between the signal and the mother wavelet is represented by the wavelet coefficients.If an artifact is present at a certain moment, the signal will produce high-amplitude coefficients at this moment.Then, a wavelet based threshold method is proposed to eliminate the coefficients according to the following formulas: where, T j is the wavelet based threshold; C j is the wavelet coefficient of jth level of the decomposition; mean() and SD() are function of average and standard deviation, respectively.Then, the artifacts can be eliminated if any coefficient bigger than T j is reduced to half.

Extraction of Relative Wavelet Energy
As the EEG signal is often transformed into δ, θ, α and β band of wave in frequency domain, the EEG signals were also decomposed into four levels in this study after wavelet transformation.The detail component at level 1, level 2, level 3 and level 4 represent β band (14-35 Hz), α band (8-14 Hz), θ band (4-8 Hz) and δ band (0.5-4 Hz), respectively.The energy at a particular level j can be calculated as the following: where C j (k) is the wavelet coefficient, and L is the total number of wavelet coefficients at the jth level.Considering individual differences for all the subjects, it is better to use the relative energy spectrum of a specific band (represented by levelj) of EEG signal, which can be computed as follows:

Feature Selection for Discriminating Different Driving Anger States
Based on the calculation procedure listed above, the relative energy spectrum of δ, θ, α and β band of EEG signal among different anger levels from one subject can be obtained, as shown in Figure 4.As indicated, the relative energy spectrum of β band (β%) in neutral state (anger level = 0) is the lowest, while β% at anger level 5 is the highest, and β% markedly increases with the increase of anger level.Meanwhile, the relative energy spectrum of θ band (θ%) markedly decreases with the increase of anger level.Additionally, the relative energy spectrum of δ band (δ%) in anger state (anger level = 1, 3, 5) is smaller than that in neutral state, and the relative energy spectrum of α band (α%) in anger state (anger level = 1, 3) is smaller than that in neutral state.However, the same consistent changing trends were not found for δ% and α%, respectively, with the increment of anger level.
smaller than that of none, low and moderate anger intensity, respectively.Moreover, the significance analysis results indicate that the main effect of anger intensity on the value of θ% is significant (p = 0.036 < 0.05).Therefore, the two indicators, β% and θ% can be used as effective features for driving anger intensity discrimination.

Method of ROC Curve Analysis
Analysis method of receiver operating characteristic (ROC) curve originated from electrical signal detection theory and now has been widely used in fields of medical diagnosis, human decision-making, industrial quality control, military monitoring and so on [31][32][33][34].It is a Further, δ %, θ%, α% and β% of the four anger states including none, low, moderate and high anger intensity from all subjects were statistically analyzed (see Table 1).The value of β% at high anger intensity is, on average, 13.93%, 9.07% and 4.82% bigger than that of none, low and moderate anger intensity, respectively.Moreover, the significance analysis results indicate that the main effect of anger intensity on the value of β% is significant (p = 0.024 < 0.05), using the significance level of 0.05.Similarly, the value of θ% at high anger intensity is, on average, 14.92%, 8.97% and 4.64% smaller than that of none, low and moderate anger intensity, respectively.Moreover, the significance analysis results indicate that the main effect of anger intensity on the value of θ% is significant (p = 0.036 < 0.05).Therefore, the two indicators, β% and θ% can be used as effective features for driving anger intensity discrimination.Analysis method of receiver operating characteristic (ROC) curve originated from electrical signal detection theory and now has been widely used in fields of medical diagnosis, human decision-making, industrial quality control, military monitoring and so on [31][32][33][34].It is a quantitative approach for accurate decision or judgment for two confused state by determining the best discriminant threshold.Therefore, it was hypothesized that ROC curve analysis method would be suitable for examining the relationship between EEG features and the presence or absence of driving anger state with a specific intensity.Here, the optimal thresholds of driving anger states with different intensity based on θ% and β% will be determined by ROC curve analysis.According to [31][32][33][34], three important principles of ROC curve analysis method for determining driving anger states are listed as follows.
(1) Generation of ROC curve.For the two kinds of driving anger intensity, a specific threshold of a certain feature to classify them is called cut-off point, shown in Figure 5a.Sensitivity, called true positive rate (TPR), is the probability at which positive samples are correctly classified based on the cut-off point.Specificity, namely true negative rate (TNR), is the probability at which negative samples are correctively classified.Additionally, false positive rate (FPR) is the probability at which negative samples are falsely classified while false negative rate (FNR) is the probability at which positive samples are falsely classified, namely: where, TP is the number of positive samples correctly classified; FP is the number of negative samples falsely classified; TN is the number of negative correctly classified; FN is the number of positive samples falsely classified.At this point, driving anger samples with a specific intensity is assumed to be positive while the other driving anger samples are assumed to be negative.
Information 2016, 7, 52 8 of 17 quantitative approach for accurate decision or judgment for two confused state by determining the best discriminant threshold.Therefore, it was hypothesized that ROC curve analysis method would be suitable for examining the relationship between EEG features and the presence or absence of driving anger state with a specific intensity.Here, the optimal thresholds of driving anger states with different intensity based on θ% and β% will be determined by ROC curve analysis.According to [31][32][33][34], three important principles of ROC curve analysis method for determining driving anger states are listed as follows.
(1) Generation of ROC curve.For the two kinds of driving anger intensity, a specific threshold of a certain feature to classify them is called cut-off point, shown in Figure 5a.Sensitivity, called true positive rate (TPR), is the probability at which positive samples are correctly classified based on the cut-off point.Specificity, namely true negative rate (TNR), is the probability at which negative samples are correctively classified.Additionally, false positive rate (FPR) is the probability at which negative samples are falsely classified while false negative rate (FNR) is the probability at which positive samples are falsely classified, namely: where, TP is the number of positive samples correctly classified; FP is the number of negative samples falsely classified; TN is the number of negative correctly classified; FN is the number of positive samples falsely classified.At this point, driving anger samples with a specific intensity is assumed to be positive while the other driving anger samples are assumed to be negative.The vertical and horizontal ordinates of the cut-off point are represented by TPR and FPR, respectively in coordinate system for ROC curve.If different cut-off points are used for driving state classification, then a ROC curve will be generated by connecting those cut-off points with a line in the coordinate system (e.g., arc FD in Figure 5b).For any identification test, the aim is to find the best cut-off point (i.e., the optimal discrimination threshold) whose sum of the FPR and the FNR is minimum, as shown in Figure 5a.The vertical and horizontal ordinates of the cut-off point are represented by TPR and FPR, respectively in coordinate system for ROC curve.If different cut-off points are used for driving state Information 2016, 7, 52 9 of 17 classification, then a ROC curve will be generated by connecting those cut-off points with a line in the coordinate system (e.g., arc FD in Figure 5b).For any identification test, the aim is to find the best cut-off point (i.e., the optimal discrimination threshold) whose sum of the FPR and the FNR is minimum, as shown in Figure 5a.

Cut-off point
(2) Detection capacity of a specific feature.The detection capacity of a certain feature for two confused driving states is determined by the position and shape of the ROC curve in the coordinate system (see Figure 5b).If the cut-off point lies on line AB (reference line), then it has no practical significance.If the cut-off point lies on line AC or CB, it means the sensitivity or specificity of the cut-off point is 100%, which implies that, FPR = 0 or FNR = 0 indicating that the discrimination accuracy under these two cases reaches maximum.If the cut-off point lies on arc FD, it represents that FPR and FNR are both bigger than 0. For detection capacity of a certain feature, the area under the curve (AUC) (see Figure 5b) of ROC can be used as an intuitionistic index to evaluate it.The greater the AUC is, the higher detection accuracy of the certain feature has.Here, the AUC can be computed through integration of trapezoidal URST (see Figure 5b): where, e and f are the upper and lower bound of horizontal ordinate (FPR), respectively; S i is area of the ith curved trapezoid in coordinate system for ROC curve, as shown in Figure 5b; y i−1 and y i are the length of upper base and the length of lower base of the ith curved trapezoid, respectively; ∆x i is height of the ith curved trapezoid.
(3) Determination of optimal threshold.According to Figure 5b, the closer the cut-off point lies to the upper left of the ROC curve, the higher discrimination accuracy is obtained, since there is smaller sum of FPR and FNR for this cut-off point.Then, during the process of looking for the best cut-off point, a variable called Youden index [34] denoted by Y is defined as follows: According to Equations ( 8) and ( 9), Y can be transformed as follows: If the Youden index (Y) of a cut-off point reaches its maximum when it is approaching the upper left corner of the ROC curve, then, the cut-off point is determined to be the best one with the optimal threshold to do the discrimination test because sum of FPR and FNR reaches its minimum at this moment.

Determining Optimal Threshold by Drawing ROC Curve
According to the principles of ROC curve analysis method, two main steps are needed for drawing ROC curve for a specific feature.First, all possible cut-off points (i.e., thresholds) of a certain feature are prepared for discrimination.Second, the corresponding TPR and FPR of each cut-off point are calculated to form a ROC curve.Then the best cut-off point from the ROC curve will be determined by the maximum of Youden index (Y).Take the relative energy spectrum of β band (β%) for example, β% at anger level 1 belongs to the range of [0.1816, 0.3164], while it belongs to the range of [0.1383, 0.2695] at anger level 0. Here, 0.0005 is selected as the interval for possible thresholds based on the combined range [0.1383, 0.3164] of β% in the two anger level states.The detailed drawing process of the ROC curve and optimal threshold determination of β% for discriminating anger level 1and 0 are shown in Figures 6 and 7. Similarly, the ROC curves were also drawn for the indicator of β% at anger level 3 and anger level 5, respectively, shown in Figure 8, while the ROC curves for the indicator of θ% at anger level 1, level 3 and level 5, are shown in Figure 9.The two steps left are used to compute the number of positive samples correctly Classified and the number of negative samples falsely classified according to the actual positive and negative samples and the inferred"positive"or"negati ve"samples based on the working threshold.Remarks β% β% β% Figure 6.Drawing process of ROC curve and determining optimal threshold for discriminating driving anger level 1 from level 0 based on β% in Matlab codes.

The Optimal Threshold for Discriminating Driving Anger Level 1 from Level 0
According to the drawing process introduced in section 4.2, the ROC curve of the relative energy spectrum (β%) at anger level 1 is shown in Figure 7.The vertical axis represents the probability of correct classification of anger level 1 samples while the horizontal axis represents the probability of false classification of anger level 0 samples.Based on the principle about optimal threshold introduced in section 4.1, point H1 is considered to be the best cut-off point, which is corresponding to the optimal threshold of 0.2586, with TPR of 81.03% and FPR of 22.14%.Meanwhile, the area under the curve (AUC) of the ROC is 0.8072, which means the detection accuracy based on β% is 80.72%, which is relatively high as the maximum of AUC is 1.It is notable that there are two turning points N (0, 0.1465) and L (0.8814, 1) in Figure 7.The specificity of point N is 100%, but the sensitivity is only 14.65%, indicating that 85.35% of anger level 1 samples are falsely classified.The sensitivity of point L is 100%, with the specificity of 11.86%, indicating that 11.86%of anger level 0 (neutral) samples are correctly classified.Therefore, if the cut-off point is located between point N and L, then its threshold is corresponding to the range of 0.2214 to 0.2438, which means that the driver is very likely to be in a transitional state of anger level 1 when his β% is located in that range, suggesting that some intervening measures are needed in advance to prevent the driver from possible road rage with low anger intensity.

The Optimal Thresholds for Discriminating Anger States with Different Intensity
Similarly, the ROC curves for indicator of β% at anger level 3 and anger level 5 based on the drawing process are shown in Figure 8, while the ROC curves for the indicator of θ% at anger level 1,    Due to monotonous increase of β% and monotonous decrease of θ%, along with the increase of driving anger intensity, the optimal threshold (i.e., best cut-off point) of the four driving anger states with different intensity can be inferred based on Table 3.The optimal threshold of none anger state (i.e.driving neutral state with anger level < 1) is 0.2183 ≤ θ% < 1, 0 < β% < 0.2586; Low anger state is 0.1539 ≤ θ% < 0.2183, 0.2586 ≤ β% < 0.3269; Moderate anger state is 0.1216 ≤ θ% < 0.1539, 0.3269 ≤ β% < 0.3674; High anger state is 0 < θ% < 0.1216, 0.3674 ≤ β% < 1 (see Table 4).Therefore, some soft intervening (e.g., releasing relaxed music when low or moderate anger is detected) or hard   Due to monotonous increase of β% and monotonous decrease of θ%, along with the increase of driving anger intensity, the optimal threshold (i.e., best cut-off point) of the four driving anger states with different intensity can be inferred based on Table 3.The optimal threshold of none anger state (i.e.driving neutral state with anger level < 1) is 0.2183 ≤ θ% < 1, 0 < β% < 0.2586; Low anger state is 0.1539 ≤ θ% < 0.2183, 0.2586 ≤ β% < 0.3269; Moderate anger state is 0.1216 ≤ θ% < 0.1539, 0.3269 ≤ β% < 0.3674; High anger state is 0 < θ% < 0.1216, 0.3674 ≤ β% < 1 (see Table 4).Therefore, some soft intervening (e.g., releasing relaxed music when low or moderate anger is detected) or hard

The Optimal Threshold for Discriminating Driving Anger Level 1 from Level 0
According to the drawing process introduced in Section 4.2, the ROC curve of the relative energy spectrum (β%) at anger level 1 is shown in Figure 7.The vertical axis represents the probability of correct classification of anger level 1 samples while the horizontal axis represents the probability of false classification of anger level 0 samples.Based on the principle about optimal threshold introduced in Section 4.1, point H1 is considered to be the best cut-off point, which is corresponding to the optimal threshold of 0.2586, with TPR of 81.03% and FPR of 22.14%.Meanwhile, the area under the curve (AUC) of the ROC is 0.8072, which means the detection accuracy based on β% is 80.72%, which is relatively high as the maximum of AUC is 1.It is notable that there are two turning points N (0, 0.1465) and L (0.8814, 1) in Figure 7.The specificity of point N is 100%, but the sensitivity is only 14.65%, indicating that 85.35% of anger level 1 samples are falsely classified.The sensitivity of point L is 100%, with the specificity of 11.86%, indicating that 11.86%of anger level 0 (neutral) samples are correctly classified.
Therefore, if the cut-off point is located between point N and L, then its threshold is corresponding to the range of 0.2214 to 0.2438, which means that the driver is very likely to be in a transitional state of anger level 1 when his β% is located in that range, suggesting that some intervening measures are needed in advance to prevent the driver from possible road rage with low anger intensity.

The Optimal Thresholds for Discriminating Anger States with Different Intensity
Similarly, the ROC curves for indicator of β% at anger level 3 and anger level 5 based on the drawing process are shown in Figure 8, while the ROC curves for the indicator of θ% at anger level 1, level 3 and level 5 are shown in Figure 9.The AUCs for indicator β% and θ% at different anger levels are in the range of 0.7914 to 0.8635 (p < 0.05), as shown in Table 2, indicating that the two indicators are suitable for significantly discriminating driving anger states with different intensity.As shown in Figure 8 and Table 3, the best cut-off points for indicator of β% at anger level 1, level 3 and level 5 are H1, H2 and H3, respectively, which are corresponding to an optimal threshold of 0.2586, 0.3269 and 0.3674, respectively.Moreover, the TPRs and FPRs for the three cut-off points belong to the range of [81.03%, 90.52%] [22.14%, 26.19%], respectively, implying the optimal thresholds have a good accuracy when discriminating different-intensity anger states.Likewise, Figure 9 and Table 3 indicate that the best cut-off points for indicator of θ% at anger level 1, level 3 and level 5 are H4, H5 and H6, respectively, which are corresponding to an optimal threshold of 0.2183, 0.1539 and 0.1216, respectively.Additionally, the TPRs and FPRs for the three cut-off points belong to the range of [75.06%, 80.09%] and [16.52%, 18.64%], respectively, also indicating the optimal thresholds have a good accuracy when discriminating different-intensity anger states.Due to monotonous increase of β% and monotonous decrease of θ%, along with the increase of driving anger intensity, the optimal threshold (i.e., best cut-off point) of the four driving anger states with different intensity can be inferred based on Table 3.The optimal threshold of none anger state (i.e., driving neutral state with anger level < 1) is 0.2183 ≤ θ% < 1, 0 < β% < 0.2586; Low anger state is 0.1539 ≤ θ% < 0.2183, 0.2586 ≤ β% < 0.3269; Moderate anger state is 0.1216 ≤ θ% < 0.1539, 0.3269 ≤ β% < 0.3674; High anger state is 0 < θ% < 0.1216, 0.3674 ≤ β% < 1 (see Table 4).Therefore, some soft intervening (e.g., releasing relaxed music when low or moderate anger is detected) or hard intervening (e.g., steering wheel or acceleration/brake pedal control by machine instead of human when high anger is detected) can be taken in advanced driving assistant system (ADAS) based on those best cut-off points for different-intensity anger states.

Verification of the Optimal Thresholds for Different-Intensity Anger States
In order to evaluate discrimination performances of the optimal thresholds for different-intensity anger states, half of emotion-EEG samples from all subjects were selected as test set while the other half had been already used as training set.The test set consisted of 349 none anger instances, 201 low anger instances, 148 moderate anger instances, and 71 high anger instances.Here, four indicators (i.e., Recall, Precision, F 1 , Acc) were introduced to quantify the discrimination performances.
where, TP, TN, FP, FN can be referenced by the definitions for formulas (6)- (9).According to the optimal thresholds for discriminating different-intensity anger states listed in Table 4, the confusion matrix and discrimination performance of the best cut-off points are computed, shown in Tables 5  and 6.It is indicated that the overall accuracy (Acc) of the optimal threshold of β% for discriminating the four driving anger states is 80.21%, while 75.20% for that of θ%.Except for Acc, Recall, Precision (i.e., positive predictive accuracy), F 1 of the optimal thresholds of β% for discriminating the four anger states are also found to be higher than that of θ%.Hence, the indicator of β% outperforms the indicator of θ% when discriminating the four anger states with different intensity.

Discussions and Conclusions
The main aim of this paper is to explore a novel driving anger induction method, to study EEG spectral features of driving anger states with different intensity in real traffic environment, to determine the optimal thresholds (best cut-off points) of the EEG features for discriminating none (neutral), low, moderate, high anger states toward road range warning.
Firstly, a specific busy route was chosen for on-road experiments, on which anger elicitation events such as jaywalking/cyclist crossing, weaving/cut-in, traffic congestion and waiting red lights are common, especially in morning peak hours.The results indicate that the novel induction method of driving anger is feasible by the elicitation events in real traffic environment if they want to complete the experiments ahead of basic time for extra paid.Interestingly, road rage perpetration was also found to be significantly greater for drivers who were always on busy roads and lower for those who never drove on busy roads in Ontario, Canada [35].Moreover, Deffenbacher et al. [36] found that road rage in U.S. usually happened because of traffic obstructions, hostile gestures, discourtesy, slow driving, police presence and illegal driving.Nevertheless, the investigation results in this study indicate that factors causing road rage are different in China, due to the differences in traffic regulation, life style, culture background and personal traffic quality.Hence, the results will be more useful in terms of policy making and prevention technology for driving training and traffic management authorities.
Secondly, the study results show that the relative energy spectrum of β band (β%) markedly increases along with the increase of anger intensity while relative energy spectrum of θ band (θ%) markedly decreases.Thereby, based on the significance analysis in this study, β% and θ% are suitable to be used as two EEG spectral features for discriminating driving anger states with different intensity.Moreover, as indicated in literature [37,38], the power spectrum and sample entropy of β band in negative emotion (e.g., sadness, anger, upset, stress and nervousness) was found to be significantly bigger than that in positive emotions or calmness.Note that δ% and α% haven't shown a substantial change trend from low driving anger state to high driving anger state, and appropriate ratio parameters (e.g., α/δ, (α + β)/δ) which can amplify the increasing or decreasing trend, may be considered to discriminate different driving anger intensity in future study.In addition, as illustrated in literature [39], a driver could experience different emotions such as excited, relaxed, nervous, and sad, and energy spectrums of all band of EEG varied with the different emotions.However, in this study, anger emotion is focused to address road rage issue, and other driving emotions could be investigated in future.
Thirdly, the optimal thresholds (best cut-off points) of β% and θ% for discriminating different driving anger states can be definitely calculated based on the best cut-off points determined by ROC curve analysis.Moreover, a specific range of β% or θ% for the transitional state of a certain driving anger state with a specific intensity can also be determined based on the turning points in the ROC curve.Additionally, according to the discrimination performances of verification, indicator of β% outperforms indicator of θ% when discriminating the four driving anger states (none anger, low anger, moderate anger and high anger).Therefore, based on the optimal thresholds for the different anger states, it is helpful in determining either soft intervening (e.g., releasing relaxed music when lower or moderate anger is detected) or hard intervening (e.g., steering wheel or brake/acceleration pedal control by machine instead of human in an advanced driver assistant system when high anger state is detected) in advance for human-machine interaction by a multimodal affective car interface before road rage causes dangerous behavior affecting traffic safety.
However, considering the limitations in this study, future work is recommended as follows.First, as only male drivers were recruited for statistical power, female drivers should be added to improve the generalizability of the proposed method.Second, the on-road experiments proposed in this study were only conducted in Wuhan, a typical central metropolis in China.The subsequent experiments can be conducted in other typical cities such as Chengdu, Guangzhou and Beijing, considering the differences of anger induction factors (events) and expression ways because of life style, driving style, traffic awareness and quality.Third, the instruments collecting EEG signals were directly attached to the subjects' body, which might interfere the subjects' regular driving performance.Therefore, some non-invasive wearable instruments should be applied.Fourth, as reported by the participants, anger do not always correlate with specific elicitation events and they may experience another anger state with different intensity, even a different emotion other than anger, facing the same elicitation, which depends on their personalities.Therefore, it is important to explore the effect of personality on emotion arousal (intensity) and valence in future.Finally, the best cut-off points from other indicators such as driving behaviors or vehicle motions can be combined with that of the EEG indicators proposed in this study to improve discrimination accuracy for anger states with different intensity.

Figure 1 .
Figure 1.The Apparatus of on-road experimental system.(a) The test vehicle; (b) NeuroScan4.5 acquisition system; (c) Monitor video camera system; (d) Overall sketch of the apparatus system.Figure 1.The Apparatus of on-road experimental system.(a) The test vehicle; (b) NeuroScan4.5 acquisition system; (c) Monitor video camera system; (d) Overall sketch of the apparatus system.

Figure 1 .
Figure 1.The Apparatus of on-road experimental system.(a) The test vehicle; (b) NeuroScan4.5 acquisition system; (c) Monitor video camera system; (d) Overall sketch of the apparatus system.Figure 1.The Apparatus of on-road experimental system.(a) The test vehicle; (b) NeuroScan4.5 acquisition system; (c) Monitor video camera system; (d) Overall sketch of the apparatus system.

Figure 2 .
Figure 2. The test route and traffic environment during on-road experiment process.(a) The test route (blue line); (b) Stimulation events in traffic environment.

Figure 2 .
Figure 2. The test route and traffic environment during on-road experiment process.(a) The test route (blue line); (b) Stimulation events in traffic environment.

Figure 3 .
Figure 3.The number of different anger intensity instances.

 2 , ( ) 2
and a corresponding scaling function () t  .The scaled and shifted version of the mother wavelet is expressed as the following[11]: /

Figure 3 .
Figure 3.The number of different anger intensity instances.

Figure 5 .
Figure 5. Schematic of ROC curve system.(a) Cut-off points to form ROC curve; (b) FPR, TPR and AUC in coordinate system.

Figure 5 .
Figure 5. Schematic of ROC curve system.(a) Cut-off points to form ROC curve; (b) FPR, TPR and AUC in coordinate system.
Building discrimination threshold array x with a interval of 0.0005based the combined range of in anger level 1and anger level 0 X=0.1383:0.0005:0.3164Saving the frequency cumulative value of β% of anger level 1and level 0 state into array a, b, respectively according to the corresponding partition of array x; [a]=hist(P,x) [b]=hist(N,x) Calculating and saving cumulative sum of elements from array a and b into array Aa, Bb respectively; Aa=cumsum(a) Bb=cumsum(b) Calculating FPR and TPR for each threshold from the threshold array x FPR=Bb/Bb(Len) TPR=Aa/Aa(Len) Drawing ROC curve by connecting all cut-off points whose horizontal ordinate and vertical ordinate are FPR and TPR for each working threshold, respectively.Computing index of Y， Y=Sensitivity+specificity-1=TPR-FPR Selecting the point Located near to the upper left of the ROC curve with the maximum of Y value as the optimal threshold for discriminating anger level 1 from level 0. P: Positive samples for of anger level 1 N: Negative samples for of anger level 0 Aa(Len): Sample size of positive samples Bb(Len):Sample size of negative samples

Figure 6 .
Figure 6.Drawing process of ROC curve and determining optimal threshold for discriminating driving anger level 1 from level 0 based on β% in Matlab codes.

Figure 8 .
Figure 8. ROC curves of β% at low, moderate and high anger level state.

Figure 9 .
Figure 9. ROC curve of θ% at low, moderate and high anger level state.

Figure
Figure ROC curves of β% at low, moderate and high anger level state.

Figure 9 .
Figure 9. ROC curve of θ% at low, moderate and high anger level state.

Table 1 .
Statistical (mean (std.)) and significance analysis of EEG spectral features between different anger intensity from all subjects.(The bold face number means the differences are significant.)

Table 1 .
Statistical (mean (std.)) and significance analysis of EEG spectral features between different anger intensity from all subjects.(The bold face number means the differences are significant.)

Table 3 .
Best cut-off point (optimal threshold) for indicator θ% and β% at different anger level.

Table 3 .
Best cut-off point (optimal threshold) for indicator θ% and β% at different anger level.

Table 2 .
Statistical analysis of AUC for indicator β% and θ% at different anger level.

Table 3 .
Best cut-off point (optimal threshold) for indicator θ% and β% at different anger level.

Table 4 .
The optimal threshold (best cut-off points) for discriminating different anger intensity.

Table 5 .
Confusion matrix for the optimal thresholds (best cut-off points) of θ% and β%.

Table 6 .
The discrimination performances of the optimal thresholds (best cut-off points) of θ% and β%.