**4. Discussion**

#### *4.1. Predictability of Stress State Depending on Tra*ffi*c Conditions and Road Type*

External driving conditions have a decisive influence on the emotional state of the driver and the occurrence of tra ffic accidents [44,45]. Based on this, two driving conditions of tra ffic congestion and road type were chosen and compared in this study. Simplified tra ffic conditions criteria, which characterize tra ffic congestion, were found to be 40 km/h of average speed with a standard deviation of 20 km/h. If this criterion is met, then we can say that it corresponds to potential tra ffic congestion and in this moment, the driver is in a high stress state. To confirm this theory, a statistical model was developed. It shows the classification accuracy of 80.3%. From the detected EDA features, the number of occurrences, duration, and amplitude of peaks and valleys were found as significant predictors for the analyzed classification model. The method for determining stress dependency on the road type segments shows the classification accuracy of 82.9% with a significant predictor of Min OD. The goodness of model fit is assessed using various measures and in modern literature there is no consensus which one is better [46]. In our study it was evaluated using Cox and Snell and Nagelkerke pseudo-R-squares, which show improvement of the constant-only model (null model) after applying all predictors (full model with predictors). Cox and Snell pseudo-R<sup>2</sup> is not able to reach "1" even for the perfect model, in turn Nagelkerke R<sup>2</sup> is adjusted Cox and Snell R<sup>2</sup> and its maximal value can be extended to "1" [46]. Obtained results for tra ffic condition model show that model explain between 32.3% (Cox and Snell) and 43.2% (Nagelkerke) of variance in low and high stress level occurrence, in turn, road type model explain between 37.4% (Cox and Snell) and 51.8% (Nagelkerke) of variance (Table 7). In previous studies, there is no consensus on how to interpret the values of pseudo-R-squares, but some sources [47,48] evaluated the Cox & Snell level higher than 0.3 and Nagelkerke level higher than 0.35 as a satisfactory. Based on this, both our models have a good level of compliance with the observations, but the road type model has higher values and it fits better the observations. The comparison of both methods is shown in Table 7. We also compared the performance of other classifiers using 10-fold cross-validation and separation of training (70%) and testing (30%) data. As shown in Table 8, overall, random forest (RF) has the best performance, the area under the ROC curve (AUC) values of RFs are 85.70% and 79.10% in 10-fold cross-validation and 89.46% and 85.82% in training/testing method, respectively. Surprisingly, multi-layered perceptron which is the neural network-based method shows the overall low performance. Thus, the performance of the tree-based methods is better than neural network-based method in this type of data.

Sensitivity and specificity each reflect how well the model developer is able to grasp high stress and low stress, respectively. A positive predictive value indicates the exactness of high stress. Experimental results show that the overall model of the road type predominates, but it can predict the stress more easily in the tra ffic-condition-based model. We use the AUC value which reflects the overall performance better as a single value.


**Table 7.** Comparison of two developed methods.

MLP

 52.94  62.50 50.00


**Table 8.** Comparison of performance (%) with other classifiers.

\* Random forest (RF), adaBoost (AB), naïve Bayes (NB), support vector machine (SVM), multi-layered perceptron (MLP).

 64.22 52.20  57.90  60.00 54.33

Initial hypothesis about dependency between driving stress, traffic congestion, and road type segments was confirmed. Both methods show accuracies higher than 80% with a small difference of 2–3%, which means that these models are effective and can be used for stress prediction in real driving conditions. Certainly not only these factors have an impact on the predictability of a driving stress state, for example, the internal negative emotions and experiences may affect the driver's state [24,49]. The distinction between these two groups of factors is a difficult scientific task. Based on this, one of the future scientific questions is the improvement of stress detection methods, considering the personal characteristics and emotions of the drivers.

Next factor that can additionally affect the predictability of the stress state is stress measures. Villarejo et al. [50] reported that EDA successfully detects various human emotional states, but it is difficult to distinguish between, for example, the stress situation and the situation of making an effort by a human. EDA sensor may recognize these two different states as the same. Additionally, previous studies devoted to the stress recognition proposed various measures, such as heart rate, blood pressure, muscle tension, etc. [51,52]. In our paper, EDA signal was used as a significant measure of the stress level. It was shown that along with the mentioned characteristics from previous studies, EDA successfully can be used to predict low/high stress during driving in real time. Moreover, EDA sensor is more convenient and useful for long-term monitoring since this type of sensors does not always require the gel-type electrodes and specific contact points on human skin unlike EEG and ECG sensors.

In the presented study, classical statistical models based on logistic regression analysis were developed. In turn, previous studies show that different approaches can be used for stress and emotional state recognition. Rigas et al. [53] proposed a model to predict driving stress (high, medium and low) using EDA and ECG signals based on a dynamic Bayesian network with an accuracy range of 31–94%. Magana et al. [54] introduced the deep learning algorithms based on the heart rate variability (HRV) signal to estimate the stress of drivers and passengers with an accuracy range of 86–92%. Jabon et al. [55] used a few classifiers, including Bayesian nets, decision tables, decision trees, support vector machines, regressions, and LogitBoost to predict unsafe driver behavior by a facial expression based on Kappa values (in most cases, LogitBoost classifier provided the highest Kappa statistic). By comparing these with the methods proposed in our paper, it should be noted that elements of advanced deep learning can be considered in the future to increase the prediction ability of the developed models. From the viewpoint of average accuracy, the presented models show satisfactory results. The proposed models can be extended to include more variables or features, but for other classifiers, there can be limitations due to algorithm inflexibility. Using presented models needs minimal e fforts and simple devices. Additionally, it can be simply applied for science and industry. Otherwise, some advanced approaches can be more di fficult. In general, the combination of developed and more advanced classifiers can result in o ffering applications with improved accuracy and predictability.

Our study demonstrates and compares two developed models capable of a satisfactory accuracy to predict the stress state of the drivers based on physiological signals. Obtained results expand previous research and new findings can be used in tra ffic management, medicine, and design of electronic devices with physiological sensors.

#### *4.2. Limitation of This Study and Future Research*

The presented research is the initial result of a long-term study about stress prediction based on physiological signals. Even though both developed classification models showed good results, there are a few limitations, which will need to be addressed in the future. First, a shortcoming of this study is the number of participants, which was limited to one male driver. The authors compensated for it by increasing the experimental period to one month to obtain the optimal number of driving datasets for analysis. Second, the temperature in the car was not regulated during the experiment. It will need to be controlled in future studies because this condition can possibly a ffect the psychological state and sweating intensity of the driver. Third, the tra ffic congestion concept is a simplified point of view. The concept of the tra ffic flow theory [26] will be used in future research. From this theory, the speed of vehicles, tra ffic flow, density, road capacity, and distance between vehicles will be considered to extend the developed methods. Fourth, the accuracies of models obtained can be improved by increasing their sensitivity to di fferent emotional states of the driver, such as anger, annoyance, stress, etc., as discussed in the previous studies [24,49,50].

Few additional observations will need to be considered in the future. For example, direct EDA data evaluation shows that average EDA data are approximately doubled in the morning route (EDA = 0.03129 mS) than in the evening route (EDA = 0.01543 mS). A higher EDA level was observed in the morning session on 12 January 2018, which was the coldest observed day with a temperature of −14 ◦C in the experimental period. Potentially, this result indicates that weather conditions and the time of day a ffect the driver's EDA signal, and these factors will be considered in the future. This and further research can find many applications, including the development of wearable devices containing physiological sensors.
