IMR Press / JIN / Volume 21 / Issue 1 / DOI: 10.31083/j.jin2101020
Open Access Original Research
Frontal lobe real-time EEG analysis using machine learning techniques for mental stress detection
Show Less
1 College of Engineering, Najran University, 55461 Najran, Saudi Arabia
2 Computer Engineering Department, Yarmouk University, 21163 Irbid, Jordan
3 IoT Research Center, College of Computer Science and Software Engineering, Shenzhen University, 518060 Shenzhen, Guangdong, China
4 School of Electronic Science and Engineering, University of Electronic Science and Technology of China, 610054 Chengdu, Sichuan, China
5 Novel Global Community Educational Foundation, NSW 2770 Hebersham, Australia
6 School of Computer Science and Engineering, University of Electronic Science and Technology of China, 611731 Chengdu, Sichuan, China
7 AI and ML specialist, Dubai Taxi Corporation, 2647 Dubai, UAE
8 Pre-Clinical Research Unit, King Fahd Medical Research Center, King Abdulaziz University, 21589 Jeddah, Saudi Arabia
9 Department of Medical Laboratory Technology, Faculty of Applied Medical Sciences, King Abdulaziz University, 21589 Jeddah, Saudi Arabia
10 AFNP Med Austria, 2770 Wien, Austria
*Correspondence: mahmoud.s@yu.edu.jo (Mahmoud Masadeh); belalheyat@gmail.com (Md Belal Bin Heyat); alextha@yahoo.gr (Athanasios Alexiou)
J. Integr. Neurosci. 2022, 21(1), 20; https://doi.org/10.31083/j.jin2101020
Submitted: 23 February 2021 | Revised: 9 March 2021 | Accepted: 6 April 2021 | Published: 28 January 2022
(This article belongs to the Special Issue Biomedical informatics in neuroscience)
Copyright: © 2022 The Author(s). Published by IMR Press.
This is an open access article under the CC BY 4.0 license.
Abstract

Stress has become a dangerous health problem in our life, especially in student education journey. Accordingly, previous methods have been conducted to detect mental stress based on biological and biochemical effects. Moreover, hormones, physiological effects, and skin temperature have been extensively used for stress detection. However, based on the recent literature, biological, biochemical, and physiological-based methods have shown inconsistent findings, which are initiated due to hormones’ instability. Therefore, it is crucial to study stress using different mechanisms such as Electroencephalogram (EEG) signals. In this research study, the frontal lobes EEG spectrum analysis is applied to detect mental stress. Initially, we apply a Fast Fourier Transform (FFT) as a feature extraction stage to measure all bands’ power density for the frontal lobe. After that, we used two type of classifications such as subject wise and mix (mental stress vs. control) using Support Vector Machine (SVM) and Naive Bayes (NB) machine learning classifiers. Our obtained results of the average subject wise classification showed that the proposed technique has better accuracy (98.21%). Moreover, this technique has low complexity, high accuracy, simple and easy to use, no over fitting, and it could be used as a real-time and continuous monitoring technique for medical applications.

Keywords
Automatic detection
Brain
Electroencephalogram
Fast fourier transform
Frontal lobe
Machine learning
Stress
University students
1. Introduction

Stress is an essential concept that is gradually being active in research attention in neuroscience, medicine, psychology, and associated fields such as sentimental computing [1, 2]. The term may be used in external or internal affairs that may trigger negative sentiments and associated physiological variations [3]. A cognitive-evaluative constituent was recently introduced into the stress mechanism to describe both inter and intra individual changeability in the connotation between induced stress levels and environmental events [4, 5]. Underneath this notion, the mapping between stress response and induced stress levels is neither universal nor constant, as it is delimited through cognitive procedures of assessment. Recent studies specify gender changes in stress adaptation and the life of specific personality types and characters, e.g., empathy, social presence, independence, work orientation, and intellectual efficiency, which are well-thought-out more susceptible to stress [6].

For example, universities can be stressful place where many scholars reveal a multiplicity of psychological health problems. A previous study revealed that one of four university scholars suffers from psychological health sicknesses, including depression and anxiety. Traumatic measures and practices may have harmful effects on life and academic activity [7]. On the internet of medical things (IoMT) [8] and the big data era, mental disorders diagnosis, detection, and management play crucial roles [9, 10]. However, 45% of high school students suffer from stress, indicating dangerous academic life impacts [11, 12]. However, the impact of stress has various ways of manifestation [13]. It could be physical such as pain, headache, and high blood pressure; emotional such as anger, anxiety, and depression, behavioral such as lacking or increasing of eating and sleeping [14, 15]; or cognitive such as learning and memory problems [16]. Consequently, hormones such as cortisol and adrenalin could be increased during stress as biological feedback of the stress [17, 18]. Thus, daily social performance could also be influenced hazardously because of the impact of stress on the human body (Fig. 1, Ref. [19]) and the brain, including reshaping the hippocampus region and cognitive areas such as the frontal cortex [20, 21].

Fig. 1.

General classification for the effects of mental stress on the human body [19].

Various techniques have been proposed to evaluate stress based on biological and biochemical effects [22]. For example, hormones such as cortisol and adrenalin have been used to assess the level of stress [23]. Furthermore, physiological effects are also used, e.g., heart rate, blood pressure, and skin temperature. Based on the recent literature, biological, biochemical, and physiological-based methods have shown inconsistent findings [24]. These inconsistent results are initiated due to hormones’ instability and several related factors such as time, gender, age, mood, health status, drugs, and smoking [25]. Thus, it is crucial to study the stress using different Electroencephalogram (EEG) signals and bioelectrical transmission information generated from the human brain [26, 27]. However, EEG waveforms recorded from the scalp are used to measure the brain’s electrical activities [28, 29]. Therefore, the decomposition of signals in different frequency bands at several spatially distributed electrodes on the whole EEG scalp is obtained in this study. Different signals have been captured from several lobe locations corresponding to specific brain functions [30]. Each lobe is dedicated to specific tasks that can be resumed in Table 1 (Ref. [31]).

Table 1. Functionality of brain regions [31].
Region Functionality
Frontal Cognitive function, decision making, and control
Temporal Memory and auditory processing
Central Motor processing
Parietal Language and coordination processing
Occipital Vision processing

Recently, using psychological signals to investigate Alzheimer, mental and sleep disorders becomes very common [32, 33, 34, 35, 36, 37, 38, 39]. Moreover, the EEG has become a crucial non-invasive measure of brain activities, and it has a vital potentiality to diagnose mental disorders, abnormalities, and the state of the brain [40, 41, 42]. Thus, the desired features are extracted from the signals recorded from the brain’s scalp. EEG has been used extensively to detect and study human stress [43, 44], especially in the frontal lobe [45]. The current study uses machine learning techniques such as Support Vector Machine (SVM) and Naive Bayes (NB) to detect and classify mental stress disorder using EEG signals. We used two types of classifications such as subject wise and mix (mental stress vs. control). Moreover, EEG spectrum analysis at the frontal lobe is applied.

2. Related work

The emerging topic of automated stress detection based on a frontal lobe EEG signal is significant in the stress research community. Lately, many studies have focused on detecting and diagnosing mental stress using EEG signals and the relationship between emotional states and frontal lobe EEG alpha-band [46, 47]. In another study, researchers studied the spectrum power, complexity, and connectivity of EEG alpha, beta, and theta bands on the frontal lobe for two groups. The first group was a moderate stressed subjects group. The second one was a high stressed subjects group. Their experiments have revealed higher left prefrontal power for the high stressed group than the moderate stressed one. Additionally, mental stress detection technique based on clustering technique using EEG signals has already been presented. The perceived stress was measured, and the level of stress was estimated using the k-means clustering method and statistical analysis. In a similar study [48], authors used brain signals EEG to investigate mental stress using classification techniques. However, several classifiers are employed, where SVM has obtained the maximum accuracy. The stress classification technique using EEG signals was proposed in [49]. For the feature extraction stage, five main features are extracted from the recorded EEG signals: absolute power, relative power, phase lag, amplitude asymmetry, and coherence. In the classification stage, minimal sequential optimization, decent stochastic gradient, logistic regression, and multilayer perceptron are applied, where logistic regression shows the highest classification accuracy compared to other techniques. According to Ranjith et al. [50], a stress detection technique based on Improved Elman Neural Network (IENN) has been introduced. Power Spectral Entropy (PSE) and Gray Level Different Statistics (GLDS) methods were applied in the feature extraction stage, while IENN was applied in the classification stage. A stress detection technique based on time and frequency domain analysis was proposed. Empirical mode decomposition (EMD) and Short-Term Fourier Transform (STFT) were applied to extract features from a recorded EEG signal then SVM was applied in the classification stage. The authors have argued that the empirical results prove the proposed method’s superiority over the existing techniques. Bairagi et al. [51] presented a hardware system to detect mental stress based on a preamplifier and filter using EEG signals. The authors have concluded that the theta band (frequency ranges from 4 Hz to 7 Hz) is associated with the frontal lobe. The obtained accuracy of the proposed approach was approximately 88%. A mental stress detection technique based on a multi-domain hybrid feature pool was proposed in a recent study [52]. Statistical analysis and wavelet-based analysis were both applied to extract features from recorded EEG signals. Following that, K-Nearest Neighbors (KNN) algorithm was used in the classification stage. The accuracy of the proposed method was 73.38%. Additionally, mental stress detection based on the Genetic Algorithm (GA) technique was proposed, where GA was applied as feature extraction and selection techniques [53]. In contrast, the KNN classifier was applied as a classification technique. The obtained accuracy of the proposed method was 72%. Priya et al. [54] proposed a stress detection technique based on power ratio for the frontal lobe using EEG. Power Spectral Density (PSD) for alpha, beta, delta, theta, and gamma bands were analyzed and computed in that study [55, 56]. At the same time, Kernel-based SVM and KNN (with several neighbors) classifiers were applied.

In this research study, we extracted the five features of the frontal lobe EEG data; the smaller number of features is better for the system due to computational load. Selection of the classifier is compulsory in oredr to have the most acceptable possible outcomes. We had two goals for the evaluation of classifiers. First, clarifying the condition in which they provide high performance. Second, indicating the excellent classifier for the same input. We evaluated different classifiers such as SVM RBF Kernel, SVM linear, SVM polynomial, SVM sigmoid, and NB.

3. Experimental dataset

This research work, which was conducted in October 2020, proposes a methodology for mental stress detection using SVM and NB classifiers. The proposed methodology is divided into five stages: experimental design, data collection, preprocessing of the recorded EEG signal, data analysis, feature extraction, and classification (Fig. 2). The EEG data were collected from fourteen participants with 182 samples. We used an EGI’s Geodesic EEG System (Giodesic Inc., USA) with 128 channels to acquire brain activities from participants’ frontal lobe. This study was approved by the Institutional Review Board (IRB) of Najran University in Saudi Arabia. A written informed consent was obtained from all subjects before the study. The information of the participants obtained by a questionnaire. All the participants were non-smokers, undergraduate university male students aged between 18 and 23 years. According to their personal history, they were healthy and had no history of chronic disorders, acute disorders, or medication/drugs. As it is normal, the cortisol level is high in the morning and low at night. Therefore, we experimented in the afternoon daytime, where the cortisol is stable. The subjects were assigned into two groups, the control group, and the stressed group. In the control group, Eyes Open (EO) as a control state is provided. Importantly, Cold Pressor Stress (CPS) is applied to the stressed group [57]. CPS is considered to be an experimental stress test. CPS is being applied as a painful stimulation. However, all subjects in the stressed group put the dominant hand into an ice water for 60 seconds. We used two times (pre and post) Depression, Anxiety and Stress Scale (DASS) [58] questionnaire to find out the stress in the students.

Fig. 2.

Experimental setup of the proposed study.

4. Methods
4.1 Classification methods

We used two classifiers in this study: SVM and NB. Support Vector Machine (SVM) is one of the supervised machine-learning algorithms with kernel based model. Recently, SVM is highly used for pattern recognition, classification, and regression. The core fundamental of the SVM is to develop a hyper plane in infinite-dimensional space for data prediction. The hyper plane’s highest accuracy is achieved, which has the most considerable distance to the classes’ nearest training point [59].

Naive Bayes (NB) classifier is based on Bayes hypothesis with the independence assumptions between predictors. It is easy to be constructed without any problematic iterative parameter valuation that makes it individually useful for big datasets. Bayes hypothesis provides the calculation of posterior probability (Ptp) from the prior probability of target (Pt), the prior probability of predictor (Pp), and the probability of predictor given target (Ppt). NB classifiers admit the effect of the value of a prior probability of a predictor on a given target. The NB classifier is described in Eqn. 1:

(1) N b = P t p P p t P t P p

4.2 Performance evaluation methods

After normalized feature extraction, we used two types of classifications such as subject wise and mix (mental stress vs. control) classifications using SVM and NB machine learning classifiers in the parameters of Sensitivity (Sen), Specificity (Spe), Accuracy (Acc), F1, Precision (Pre), and Area Under the Curve (AUC) on the 14 recordings of the frontal lobe EEG signals. Additionally, we used seven models such as random sampling, leave one out, and five cross-validation techniques, including 20, 10, 5, 3, and 2 folds for the classifiers. These parameters’ performance, including Sen, Spe, Acc, F1, and Pre, are described in Eqns. 2,3,4,5,6 and Table 2 [60, 61].

(2) S e n = ( T P F N + T P )

(3) S p e = ( T N F P + T N )

(4) A c c = ( T P + T N T P + T N + F P + F N )

(5) P r e = ( T P T P + F P )

(6) F 1 = 2 ( S e n × P r e S e n + P r e )

where TP is the true positive, TN is the true negative, FP is the false positive, and FN is the false negative.

Table 2.Description of accuracy measures.
Actual class Predicted class
Mental stress Control
Stress True positive (TP) False positive (FP)
Control False negative (FN) True negative (TN)
5. Results and discussion
5.1 Analysis of the frontal lobe EEG signal

As a preprocessing stage, alternating current (AC) power noise is removed and data is filtered using a notch filter, i.e., band stop filter, which is used to attenuate the specific band frequency range of the signal as given in Eqn. 7. Following that, to obtain frequencies within a specific range, EEG data is passed through a band pass filter with a cut-off frequency of 0.1–30 Hz. Finally, to decompose a multivariate EEG signal into independent signals, Independent Component Analysis (ICA) method is applied to remove several sources artifacts, such as Electrooculography (EOG) and Electromyography (EMG) signals. ICA is given in Eqn. 8. At data analysis and feature extraction stages, FFT, which is described in Eqn. 9, is applied in the frequency domain to extract the mean power spectrum for EEG main bands, delta (0.1–3.9 Hz), theta (4–7.9 Hz), alpha (8–13.9 Hz), beta (14–29.9 Hz), and gamma (30–80 Hz) for 16 channels covering the frontal lobe [62, 63, 64].

(7) H ( s ) = s 2 + w 2 s 2 + w c 2 + w 2

(8) x = i = 1 n a i S i

(9) X [ k ] = n = 0 N - 1 x [ n ] e - j 2 π k n N

where, s is the vector form signal, wc is the range of attenuated band frequency, x is the signal with vector s, and N is the domain’s size.

To process our EEG data for frontal lobe channels, we used the EEG LAB, an interactive Matlab toolbox for processing continuous and event-related EEG. Table 3 shows the minimum and maximum values of the mean power spectrum of all EEG bands in the frontal lobe for stress and control groups, respectively. The differences between stress and control power spectrum value, expressed in μV2/Hz, for the EEG waves such as delta, theta, alpha, beta, and gamma are shown in Fig. 3. In the delta activity, the stress and control group’s differences in maximum and minimum normalized values were 0.065 and 0.388, respectively. However, in the theta activity, these differences were –1.094 and –0.426, respectively. In the alpha activity, the stress and control group’s differences in maximum and minimum normalized value were found to be –0.030 and –0.014, respectively. In the beta activity, the stress and control group’s differences in maximum and minimum normalized values were 0.101 and 0.235, respectively. Regarding gamma activity, the stress and control group’s differences in maximum and minimum normalized values were –0.375 and 0.518, respectively. At the final stage, the obtained feature vector is classified using SVM and NB classifiers.

Table 3.Normalized power spectrum in μV2/Hz of the frontal lobe EEG bands for stress and control group.
Group Mental stress Control Differences of the mental stress and control
Max. Min. Max. Min. Max. Min.
Delta activity 1.788 1.788 1.723 1.400 0.065 0.388
Theta activity –0.444 –0.444 0.650 –0.018 –1.094 –0.426
Alpha activity –0.447 –0.447 –0.417 –0.433 –0.030 –0.014
Beta activity –0.448 –0.448 –0.549 –0.683 0.101 0.235
Gamma activity –0.448 –0.448 –0.073 –0.966 –0.375 0.518
Fig. 3.

Differences between mental stress and control group for the mean power spectrum.

5.2 Classification results

We used two type of classifications: (1) subject wise and (2) mix (mental stress vs. control) using SVM and NB classifiers. In subject wise classification our system average performance in terms of Sen, Spe, Acc, F1, Pre, and AUC were 0.9821, 0.9777, 0.9821, 0.9817, 0.9849, and 0.9855, respectively (Table 4 and Fig. 4).

Table 4. Subject wise classification using SVM and NB.
Subject Classifier Sen Spe Acc F1 Pre AUC
1 SVM 1 1 1 1 1 1
NB 1 1 1 1 1 1
2 SVM 1 1 1 1 1 1
NB 1 1 1 1 1 1
3 SVM 0.900 0.910 0.900 0.899 0.917 1
NB 0.875 0.887 0.875 0.874 0.901 0.965
4 SVM 0.950 0.925 0.950 0.949 0.954 1.00
NB 0.875 0.812 0.875 0.869 0.897 0.977
5 SVM 1 1 1 1 1 1
NB 1 1 1 1 1 1
6 SVM 1 1 1 1 1 1
NB 0.925 0.861 0.925 0.923 0.933 1
7 SVM 1 1 1 1 1 1
NB 1 1 1 1 1 1
8 SVM 1 1 1 1 1 1
NB 1 1 1 1 1 1
9 SVM 1 1 1 1 1 0.812
NB 0.975 0.983 0.975 0.975 0.976 1
10 SVM 1 1 1 1 1 1
NB 1 1 1 1 1 1
11 SVM 1 1 1 1 1 1
NB 1 1 1 1 1 1
12 SVM 1 1 1 1 1 0.842
NB 1 1 1 1 1 1
13 SVM 1 1 1 1 1 1
NB 1 1 1 1 1 1
14 SVM 1 1 1 1 1 1
NB 1 1 1 1 1 1
Average 0.9821 0.9777 0.9821 0.9817 0.9849 0.9855
Data in bold represent the model with the highest performance.
Fig. 4.

Average of the subject wise classification using SVM and NB machne learning classifiers.

In the mix (mental stress vs. control) classification, Table 5 represents the performances of the SVM Radial Basis Function (RBF) Kernel classifier. The random sampling model gave the highest performance as compared to the others. The values of Sen, Spe, Acc, F1, Pre, and AUC were found to be 0.814, 0.815, 0.814, 0.814, 0.815, and 0.861, respectively. Table 6 represents the SVM linear classifier’s performances, where Leave One Out model gave the highest performance compared to the other models. The values of Sen, Spe, Acc, F1, Pre, and AUC were found to be 0.902, 0.902, 0.902, 0.902, 0.915, and 0.937, respectively. Similarly, Table 7 represents the SVM polynomial classifier’s performances, where the 3-fold model gave the highest performance compared to the others. The values of Sen, Spe, Acc, F1, Pre, and AUC were found to be 0.799, 0.799, 0.799, 0.799, 0.799, and 0.846, respectively. Table 8 represents the SVM sigmoid classifier’s performances, where the random sampling model has the highest performance. The values of Sen, Spe, Acc, F1, Pre, and AUC were found to be 0.814, 0.815, 0.814, 0.814, 0.815, and 0.774, respectively. The NB classifier’s performances are shown in Table 9, where the random sampling model gave the highest performance compared to other models. The values of Sen, Spe, Acc, F1, Pre, and AUC were found to be 0.817, 0.817, 0.817, 0.817, 0.817, and 0.897, respectively.

Table 5.Mix (mental stress vs. control) classification results using SVM RBF Kernel.
Models Sen Spe Acc F1 Pre AUC
Random sampling 0.814 0.815 0.814 0.814 0.815 0.861
Leave one out 0.805 0.805 0.805 0.805 0.805 0.821
20 0.805 0.805 0.805 0.805 0.805 0.859
10 0.805 0.805 0.805 0.805 0.805 0.864
5 0.805 0.805 0.805 0.805 0.805 0.888
3 0.805 0.805 0.805 0.805 0.805 0.894
2 0.805 0.805 0.805 0.805 0.805 0.884
Average 0.8063 0.8064 0.8063 0.8063 0.8064 0.8673
±SD 0.0032 0.0035 0.0032 0.0032 0.0035 0.0229
Data in bold represent the model with the highest performance.
Table 6.Mix (mental stress vs. control) classification results using SVM Linear.
Models Sen Spe Acc F1 Pre AUC
Random sampling 0.898 0.901 0.898 0.897 0.897 0.883
Leave one out 0.902 0.902 0.902 0.902 0.007 0.937
20 0.902 0.902 0.902 0.902 0.007 0.903
10 0.902 0.902 0.902 0.902 0.897 0.905
5 0.897 0.897 0.897 0.896 0.007 0.890
3 0.897 0.897 0.897 0.896 0.897 0.908
2 0.879 0.879 0.879 0.879 0.007 0.891
Average 0.8967 0.8971 0.8967 0.8963 0.3884 0.9024
±SD 0.0076 0.0077 0.0076 0.0075 0.4404 0.0165
Data in bold represent the model with the highest performance.
Table 7.Mix (mental stress vs. control) classification results using SVM Polynomial.
Models Sen Spe Acc F1 Pre AUC
Random sampling 0.810 0.810 0.810 0.810 0.810 0.819
Leave one out 0.799 0.799 0.799 0.799 0.799 0.810
20 0.799 0.799 0.799 0.799 0.799 0.828
10 0.799 0.799 0.799 0.799 0.799 0.832
5 0.799 0.799 0.799 0.799 0.799 0.832
3 0.799 0.799 0.799 0.799 0.799 0.846
2 0.799 0.799 0.799 0.799 0.799 0.836
Average 0.8006 0.8006 0.8006 0.8006 0.8006 0.8290
±SD 0.0038 0.0038 0.0038 0.0038 0.0038 0.0108
Data in bold represent the model with the highest performance.
Table 8.Mix (mental stress vs. control) classification results using SVM Sigmoid.
Models Sen Spe Acc F1 Pre AUC
Random sampling 0.814 0.815 0.814 0.814 0.815 0.774
Leave one out 0.805 0.805 0.805 0.805 0.805 0.787
20 0.805 0.805 0.805 0.805 0.805 0.744
10 0.805 0.805 0.805 0.805 0.805 0.746
5 0.805 0.805 0.805 0.805 0.805 0.784
3 0.805 0.805 0.805 0.805 0.805 0.774
2 0.805 0.805 0.805 0.805 0.805 0.787
Average 0.8063 0.8064 0.8063 0.8063 0.8064 0.7709
±SD 0.0031 0.0035 0.0031 0.0031 0.0035 0.0171
Data in bold represent the model with the highest performance.
Table 9.Mix (mental stress vs. control) classification results using NB.
Models Sen Spe Acc F1 Pre AUC
Random sampling 0.817 0.817 0.817 0.817 0.817 0.897
Leave one out 0.810 0.810 0.810 0.810 0.810 0.882
20 0.810 0.810 0.810 0.810 0.810 0.896
10 0.810 0.810 0.810 0.810 0.810 0.902
5 0.810 0.810 0.810 0.810 0.810 0.906
3 0.805 0.805 0.805 0.805 0.805 0.913
2 0.805 0.805 0.805 0.805 0.805 0.906
Average 0.8096 0.8096 0.8096 0.8096 0.8096 0.9003
±SD 0.0037 0.0037 0.0037 0.0037 0.0037 0.0092
Data in bold represent the model with the highest performance.

The highest and average results obtained by the proposed classifiers. As shown in Fig. 5, the SVM linear classifier achieved the highest accuracy in both individual and average cases. Additionally, the differences between the mean of the highest and average performance of the classification shown in Fig. 6. The proposed SVM linear classification results for the leave one out model regarding sensitivity, specificity, and accuracy were found to be 0.902 for all of them. In addition, SVM linear classifier achieved the highest accuracy in the models’ average in terms of sensitivity, specificity, and accuracy were found to be 0.8967, 0.8971, and 0.8967, respectively.

Fig. 5.

Comparison of the (a) highest performance and (b) average classifiers for the mix (mental stress vs. control) classification.

Fig. 6.

Comparative analysis between the mean of the highest and average performance classifications.

5.3 Comparison between previously selected and proposed method

Asif et al. [49] designed a stress classification technique using EEG signals regarding previous related work. As a feature extraction stage, five main features are extracted from the recorded EEG signals: absolute power, relative power, coherence, phase lag, and amplitude asymmetry. Minimal sequential optimization, decent stochastic gradient, logistic regression, and multilayer perceptron are applied in the classification stage. Importantly, logistic regression shows the highest classification accuracy. Ranjith et al. [50] introduced a stress detection technique based on Improved Elman Neural Network (IENN). Power Spectral Entropy (PSE) and Gray Level Different Statistics (GLDS) methods were applied in the feature extraction stage, where IENN was applied in the classification stage. Bairagi et al. [51], a hardware system to detect mental stress based on a preamplifier and filter using EEG signals was presented. The authors have found that the Theta band is associated with the frontal lobe. The accuracy of the proposed approach was approximately 88%. In a similar study by Hasan et al. [65], a mental stress detection technique based on a multi-domain hybrid feature pool has been proposed. Moreover, statistical analysis and wavelet-based analysis are both applied to extract features from recorded EEG signals. Following that, the KNN algorithm is used in the classification stage. The accuracy of the proposed method was 73.38%. Many wearable smart devices such as CGX-Quick 30, dry EEG head set, EMOTIV-EPOC X, MUSE-2, mBrainTrain-SMARTING mobi, OpenBCI-Cyton, and sensing-DSI 24 based on flexible electronics are used in the recording of the EEG signal in modern world.

In Shon et al. [53], mental stress detection based on the Genetic Algorithm (GA) technique is proposed, where GA is applied as a feature extraction and selection technique. KNN classifier is applied as a classification technique. The accuracy of the proposed method was 72%. In Priya et al. [54], a stress detection technique based on power ratio for the frontal lobe using EEG is proposed. PSD for delta, alpha, beta, theta, and gamma bands are analyzed and computed. Kernel-based SVM and KNN classifiers are applied. As a result, KNN shows better accuracy results than SVM. Wijsman et al. [66] used the Piezoelectric Film Sensor (PFS) to record the participants’ stress. They applied the KNN classifier, and they were able to achieve 80% accuracy. Sun et al.[67] used thirty subjects using an ECG signal to record the cardiac signal. Additionally, they classified the signal using a Decision Tree (DT) classifier, which achieved 80% accuracy, where DT is easy to understand efficiently [68]. Previously, many smart devices, including accelerometer, Galvanic Skin Response (GSR), smart watch, and electrodes for the recording of the physiological signal such as ECG, EEG, and EMG, are used to detect stress [69, 70] . They used DT, KNN, and SVM classifiers to classify the subjects mentioned in Table 10 (Ref. [53, 65, 66, 67, 69, 70, 71]). However, our proposed method achieved better results (subject wise classification: 98% and mix (mental stress vs. control) classifications: 90%) than previously selected methods, as shown in Fig. 7.

Table 10.Comparative analysis between the proposed system and the previous work.
Reference Year Particip. Data recording tool Signal Classifier Acc. (%)
Wijsman et al. [66] 2011 30 PFS ECG, EMG KNN 80
Sun et al. [67] 2012 20 Accelerometer ECG DT 80
Kurniawan et al. [70] 2013 - GSR sensor GSR DT 77
Ciabattoni et al. [69] 2017 10 Smart watch HR KNN 84
Son et al. [53] 2018 32 32 Active AgCl electrodes system EEG, EOG, EMG KNN 72
Castaldo et al. [71] 2019 42 Kendall - 530 series foam electrodes ECG SVM 88
Hasan et al. [65] 2019 32 32 Active AgCl electrodes system EEG KNN 73
Proposed 14 128 EEG channels system EEG SVM, NB (Subject wise classification) 98
SVM Linear (Mix classification) 90
PFS, Piezoelectric Film Sensor; ECG, Electrocardiogram; EMG, Electromyogram; EEG, Electroencephalogram; KNN, K-Nearest Neighbor; GMM, Gaussian Mixture Model; GSR, Galvanic Skin Response; HR, Heart Rate; DEAP, database for emotion analysis using physiological signals. Data in bold represent the results of our proposed method compared to previously selected methods.
Fig. 7.

Comparison between accuracy of the previously selected and proposed system.

The main advantages of the proposed method are free over fitting, fast, low complexity, high accuracy, simplicity and ease to use. Finally, it could be used as a real-time and continuous monitoring technique [72, 73]. However, one gender research, one modality, and one lobe are the limitation of this study. Moreover, this study is applied only for 14 subjects that might increase the classification accuracy of the study.

6. Conclusions

Mental stress detection is a key issue for human beings’ health. Importantly, diagnosing and detecting mental stress is vital to prevent its dangerous consequences. In this study, an automatic real-time mental stress detection using frontal lobe EEG signal was proposed. SVM and NB machine learning classifiers are applied on frontal lobe scalp EEG. Importantly, parameters including sensitivity, specificity, accuracy, precision, and area under the curve for the classification of different groups (control and stress) were calculated. Our results showed that the proposed SVM linear classifier has easily identified the stress and control participants with 90% accuracy, which is higher than the related work accuracy. As a future work in this area, we propose to examine the stress through other physiological signals with more extensive experimental data.

Abbreviations

AC, alternating current; CPS, Cold Pressor Stress; DASS, Depression, Anxiety and Stress Scale; EEG, Electroencephalogram; EMD, Empirical mode decomposition; EO, Eyes Open; EOG, Electrooculography; FFT, Fast Fourier Transform; GA, Genetic Algorithm; GLDS, Gray Level Different Statistics; IENN, Improved Elman Neural Network; IoMT, internet of medical things; KNN, K-Nearest Neighbors; NB, Naive Bayes; PSE, Power Spectral Entropy; PSD, Power Spectral Density; STFT, Short-Term Fourier Transform; SVM, Support Vector Machine.

Author contributions

OA—conceptualization, validation, and methodology; MM—methodology, review and editing; MBBH—write-up, and simulation; FA—conceptualization, and simulation; HA—data curation and writing; GMA—supervision and funding; AA—investigation, supervision and funding.

Ethics approval and consent to participate

This study was approved by the Institutional Review Board (IRB) of Najran University in Saudi Arabia (442-43-37729). A written informed consent was obtained from all subjects before the study.

Acknowledgment

We thank the Deanship of Scientific Research funded this work (DSR), King Abdulaziz University, Jeddah, Saudi Arabia for their financial support. Also, we thank three anonymous reviewers for excellent criticism of the article.

Funding

This project was funded by the Deanship of Scientific Research (DSR), King Abdulaziz University, Jeddah, Saudi Arabia under grant no. KEP-1-141-41. The authors, therefore, acknowledge with thanks DSR technical and financial support.

Conflict of interest

The authors declare no conflict of interest.

References
[1]
Lupien SJ, McEwen BS, Gunnar MR, Heim C. Effects of stress throughout the lifespan on the brain, behaviour and cognition. Nature Reviews Neuroscience. 2009; 10: 434–445.
[2]
Tzimourta KD, Tzallas AT, Giannakeas N, Astrakas LG, Tsalikakis DG, Angelidis P, et al. A robust methodology for classification of epileptic seizures in EEG signals. Health and Technology. 2019; 9: 135–142.
[3]
Tzimourta KD, Christou V, Tzallas AT, Giannakeas N, Astrakas LG, Angelidis P, et al. Machine learning algorithms and statistical approaches for alzheimer’s disease analysis based on resting-state EEG recordings: a systematic review. International Journal of Neural Systems. 2021; 31: 2130002.
[4]
Omidvar M, Zahedi A, Bakhshi H. EEG signal processing for epilepsy seizure detection using 5-level Db4 discrete wavelet transform, GA-based feature selection and ANN/SVM classifiers. Journal of Ambient Intelligence and Humanized Computing. 2021; 1–9.
[5]
Feng Z, Li N, Feng L, Chen D, Zhu C. Leveraging ECG signals and social media for stress detection. Behaviour & Information Technology. 2021; 40: 116–133.
[6]
Dumitru VM, Cozman D. The relationship between stress and personality factors. International Journal of the Bioflux Society. 2012; 4: 34–39.
[7]
Saleem S, Mahmood Z, Naz M. Mental health problems in university students: a prevalence study. FWU Journal of Social Sciences. 2013; 7: 124–130.
[8]
Al Shorman O, Al Shorman B, Al-Khassaweneh M, Alkahtani F. A review of internet of medical things (IoMT)—Based remote health monitoring through wearable sensors: a case study for diabetic patients. Indonesian Journal of Electrical Engineering and Computer Science. 2020; 20: 414–422.
[9]
Hasan MJ, Kim JM. A hybrid feature pool-based emotional stress state detection algorithm using EEG signals. Brain Sciences. 2019; 9: 376.
[10]
AlShorman O, AlShorman B, Alkahtani F. A review of wearable sensors based monitoring with daily physical activity to manage type 2 diabetes. International Journal of Electrical and Computer Engineering. 2021; 11: 646–653.
[11]
Dushanova J, Christov M. The effect of aging on EEG brain oscillations related to sensory and sensorimotor functions. Advances in Medical Sciences. 2014; 59: 61–67.
[12]
Mason AE, Adler JM, Puterman E, Lakmazaheri A, Brucker M, Aschbacher K, et al. Stress resilience: narrative identity may buffer the longitudinal effects of chronic caregiving stress on mental health and telomere shortening. Brain, Behavior, and Immunity. 2019; 77: 101–109.
[13]
Belleau EL, Treadway MT, Pizzagalli DA. The impact of stress and major depressive disorder on hippocampal and medial prefrontal cortex morphology. Biological Psychiatry. 2019; 85: 443–453.
[14]
Maarouf M, Maarouf CL, Yosipovitch G, Shi VY. The impact of stress on epidermal barrier function: an evidence-based review. British Journal of Dermatology. 2019; 181: 1129–1137.
[15]
Morgado P, Cerqueira JJ. The impact of stress on cognition and motivation stress. Frontiers in Behavioral Neuroscience. 2018; 12, 326.
[16]
Vogel S, Schwabe L. Learning and memory under stress: implications for the classroom. NPJ Science of Learning. 2016; 1: 16011.
[17]
McEwen BS, Nasca C, Gray JD. Stress effects on neuronal structure: hippocampus, amygdala, and prefrontal cortex. Neuropsychopharmacology. 2016; 41: 3–23.
[18]
Sherman GD, Mehta PH. Stress, cortisol, and social hierarchy. Current Opinion in Psychology. 2020; 33: 227–232.
[19]
Yaribeygi H, Panahi Y, Sahraei H, Johnston TP, Sahebkar A. The impact of stress on body function: a review. EXCLI Journal. 2017; 16: 1057–1072.
[20]
Al Shorman O, Al Shorman A. Frontal lobe and long-term memory retrieval analysis during pre-learning stress using EEG signals. Bulletin of Electrical Engineering and Informatics. 2020; 9: 141–145.
[21]
Akhtar F, Bin Heyat MB, Li JP, Patel PK, Rishipal, Guragai B. Role of machine learning in human stress: a review. 2020 17th International Computer Conference on Wavelet Active Media Technology and Information Processing. 2020; 170–174.
[22]
Wiegand C, Heusser P, Klinger C, Cysarz D, Büssing A, Ostermann T, et al. Stress-associated changes in salivary microRNAs can be detected in response to the trier social stress test: an exploratory study. Scientific Reports. 2018; 8: 7112.
[23]
Aigrain J, Spodenkiewicz M, Dubuisson S, Detyniecki M, Cohen D, Chetouani M. Multimodal stress detection from multiple assessments. IEEE Transactions on Affective Computing. 2016; 9: 491–506.
[24]
Vanitha V, Krishnan P. Real time stress detection system based on EEG signals. Biomedical Research. 2016.
[25]
Giannakakis G, Grigoriadis D, Giannakaki K, Simantiraki O, Roniotis A, Tsiknakis M. Review on psychological stress detection using biosignals. IEEE Transactions on Affective Computing. 2019; 1. (in press)
[26]
Machado Fernández JR, Anishchenko L. Mental stress detection using bioradar respiratory signals. Biomedical Signal Processing and Control. 2018; 43: 244–249.
[27]
Bin Heyat B, Hasan YM, Siddiqui MM. EEG signals and wireless transfer of EEG signals. International Journal of Advanced Research in Computer and Communication Engineering. 2015; 4: 10–12.
[28]
Bakhshayesh H, Fitzgibbon SP, Janani AS, Grummett TS, Pope KJ. Detecting synchrony in EEG: a comparative study of functional connectivity measures. Computers in Biology and Medicine. 2019; 105: 1–15.
[29]
Bin Heyat M, Siddiqui MM. Recording of EEG, ECG, EMG signal. 2015. Available at: www.ivline.org (Accessed: 1 March 2021).
[30]
Menning H, Renz A, Seifert J, Maercker A. Reduced mismatch negativity in posttraumatic stress disorder: a compensatory mechanism for chronic hyperarousal? International Journal of Psychophysiology. 2008; 68: 27–34.
[31]
Matyi M, Cioaba S, Banich MT, Spielberg JM. Identifying brain regions supporting amygdalar functionality: a complex anatomical network perspective. Biological Psychiatry. 2020; 87: S401–S402.
[32]
Tzimourta KD, Afrantou T, Ioannidis P, Karatzikou M, Tzallas AT, Giannakeas N, et al. Analysis of electroencephalographic signals complexity regarding Alzheimer’s Disease. Computers & Electrical Engineering. 2019; 76: 198–212.
[33]
Heyat MBB. Insomnia: Medical sleep disorder & diagnosis. 1st edn. Hamburg, Germany: Anchor Academic Publishing. 2017.
[34]
Heyat MBB, Lai D, Akhtar F, Hayat MAB, Azad S. Short time frequency analysis of theta activity for the diagnosis of bruxism on EEG sleep. In Gupta D, Hassanien A. (eds.) Advanced computational intelligence techniques for virtual reality in healthcare. Studies in Computational Intelligence (pp. 63–83). Berlin, Germany: Springer. 2020.
[35]
Belal Bin Heyat M, Akhtar F, Khan MH, Ullah N, Gul I, Khan H, et al. Detection, treatment planning, and genetic predisposition of bruxism: a systematic mapping process and network visualization technique. CNS & Neurological Disorders-Drug Targets. 2020; 19. (in press)
[36]
Bin Heyat B, Akhtar F, Singh SK, Siddiqui MM. Hamming window are used in the prognostic of insomnia. In International Seminar Present Scenario Future Prospectives Res. Eng. Sci. 2017; 65–71.
[37]
Hasan MJ, Shon D, Im K, Choi HK, Yoo DS, Kim JM. Sleep state classification using power spectral density and residual neural network with multichannel EEG signals. Applied Sciences. 2020; 10: 7639.
[38]
Heyat MBB, Lai D, Akhtar F, Hayat MAB, Azad S, Azad S, et al. Bruxism detection using single-channel C4-A1 on human sleep S2 stage recording. In Gupta D, Bhattacharyya S, Khanna A. (eds.) Intelligent data analysis: from data gathering to data comprehension (pp. 347–367). 1st edn. NY, USA: John Wiley & Sons. 2020.
[39]
Khan H, Bin Heyat MB, Lai D, Akhtar F, Ansari MA, Khan A, et al. Progress in detection of insomnia sleep disorder: a comprehensive review. Current Drug Targets. 2021; 22: 672–684.
[40]
Pal R, Bin Heyat MB, You Z, Pardhan B, Akhtar F, Jafar Abbas S, et al. Effect of maha mrityunjaya HYMN recitation on human brain for the analysis of single EEG channel C4-A1 using machine learning classifiers on yoga practitioner. 2020 17th International Computer Conference on Wavelet Active Media Technology and Information Processing. 2020; 89–92.
[41]
Cea-Cañas B, Gomez-Pilar J, Núñez P, Rodríguez-Vázquez E, de Uribe N, Díez Á, et al. Connectivity strength of the EEG functional network in schizophrenia and bipolar disorder. Progress in Neuro-Psychopharmacology and Biological Psychiatry. 2020; 98: 109801.
[42]
Dushanova J, Tsokov SA. Small-world EEG network analysis of functional connectivity in developmental dyslexia after visual training intervention. Journal of Integrative Neuroscience. 2020; 19: 601–618.
[43]
AlShorman O, Ali T, Irfan M. EEG analysis for pre-learning stress in the brain. Communications in Computer and Information Science. 2017; 1: 447–455.
[44]
Dushanova J, Tsokov S. Altered electroencephalographic networks in developmental dyslexia after remedial training: a prospective case-control study. Neural Regeneration Research. 2021; 16: 734–743.
[45]
Olson EA, Cui J, Fukunaga R, Nickerson LD, Rauch SL, Rosso IM. Disruption of white matter structural integrity and connectivity in posttraumatic stress disorder: a TBSS and tractography study. Depression and Anxiety. 2017; 34: 437–445.
[46]
Zubair M, Yoon C. Multilevel mental stress detection using ultra-short pulse rate variability series. Biomedical Signal Processing and Control. 2020; 57: 101736.
[47]
Goodman RN, Rietschel JC, Lo L, Costanzo ME, Hatfield BD. Stress, emotion regulation and cognitive performance: the predictive contributions of trait and state relative frontal EEG alpha asymmetry. International Journal of Psychophysiology. 2013; 87: 115–123.
[48]
Sharma R, Chopra K. EEG signal analysis and detection of stress using classification techniques. Journal of Information and Optimization Sciences. 2020; 41: 229–238.
[49]
Asif A, Majid M, Anwar AM. Human stress classification using EEG signals in response to music tracks. Computers in Biology and Medicine. 2019; 107: 180–196.
[50]
Ranjith C, Arunkumar B. An improved elman neural network based stress detection from EEG signals and reduction of stress using music. International Journal of Engineering Research & Technology. 2019; 12: 16–23.
[51]
Bairagi V, Kulkarni S. A novel method for stress measuring using EEG signals. Advances in Intelligent Systems and Computing. 2018; 887.
[52]
Sulaiman N, Taib MN, Lias S, Murat ZH, Aris SAM, Hamid NHA. Novel methods for stress features identification using EEG signals. International Journal of Simulation: Systems, Science and Technology. 2011; 12: 27–33.
[53]
Shon D, Im K, Park J, Lim D, Jang B, Kim J. Emotional stress state detection using genetic algorithm-based feature selection on EEG signals. International Journal of Environmental Research and Public Health. 2018; 15: 2461.
[54]
Priya TH, Mahalakshmi P, Naidu V, Srinivas M. Stress detection from EEG using power ratio. 2020 International Conference on Emerging Trends in Information Technology and Engineering. 2020.
[55]
Heyat MBB, Akhtar F, Ammar M, Hayat B, Azad S. Power spectral density are used in the investigation of insomnia neurological disorder. XL-Pre Congress Symposium. 2016; 45–50.
[56]
Lai D, Heyat MBB, Khan FI, Zhang Y. Prognosis of sleep bruxism using power spectral density approach applied on EEG signal of both EMG1-EMG2 and ECG1-ECG2 channels. IEEE Access. 2019; 7: 82553–82562.
[57]
Jun G, Smitha KG. EEG based stress level identification. 2016 IEEE International Conference on Systems, Man, and Cybernetics. 2016; 003270–003274.
[58]
McCarthy L, Fuller J, Davidson G, Crump A, Positano S, Alderman C. Assessment of yoga as an adjuvant treatment for combat-related posttraumatic stress disorder. Australasian Psychiatry. 2017; 25: 354–357.
[59]
Cervantes J, Garcia-Lamont F, Rodríguez-Mazahua L, Lopez A. A comprehensive survey on support vector machine classification: applications, challenges and trends. Neurocomputing. 2020; 408: 189–215.
[60]
Heyat MBB, Lai D, Khan FI, Zhang Y. Sleep bruxism detection using decision tree method by the combination of C4-P4 and C4-A1 channels of scalp EEG. IEEE Access. 2019; 7: 102542–102553.
[61]
Bin Heyat MB, Akhtar F, Khan A, Noor A, Benjdira B, Qamar Y. A novel hybrid machine learning classification for the detection of bruxism patients using physiological signals. Applied Sciences. 2020; 10: 7410.
[62]
Dimigen O. Optimizing the ICA-based removal of ocular EEG artifacts from free viewing experiments. NeuroImage. 2020; 207: 116117.
[63]
Daud SS, Sudirman R. Butterworth bandpass and stationary wavelet transform filter comparison for electroencephalography signal. 2015 6th International Conference on Intelligent Systems, Modelling and Simulation. 2015: 123–126.
[64]
Saxena A, Tripathi K, Khanna A, Gupta D, Sundaram S. Emotion detection through EEG signals using FFT and machine learning techniques. Advances in Intelligent Systems and Computing. 2020; 34: 543–550.
[65]
Hasan MJ, Kim JM. A hybrid feature pool-based emotional stress state detection algorithm using EEG signals. Brain Sciences. 2019; 9: 376.
[66]
Wijsman J, Grundlehner B, Liu H, Hermens H, Penders J. Towards mental stress detection using wearable physiological sensors. Institute of Electrical and Electronics Engineers. 2011; 2011: 1798–1801.
[67]
Sun F, Kuo C, Cheng H, Buthpitiya S, Collins P, Griss M. Activity-aware mental stress detection using physiological sensors. Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering. 2012; 76: 282–301.
[68]
Masadeh M, Aoun A, Hasan O, Tahar S. Decision tree-based adaptive approximate accelerators for enhanced quality. 2020 IEEE International Systems Conference. 2020: 1–5.
[69]
Ciabattoni L, Ferracuti F, Longhi S, Pepa L, Romeo L, Verdini F. Real-time mental stress detection based on smartwatch. 2017 IEEE International Conference on Consumer Electronics (ICCE). 2017; 110–111.
[70]
Kurniawan H, Maslov AV, Pechenizkiy M. Stress detection from speech and Galvanic Skin Response signals. Proceedings of the 26th IEEE International Symposium on Computer-Based Medical Systems. 2013; 209–214.
[71]
Castaldo R, Montesinos L, Melillo P, James C, Pecchia L. Ultra-short term HRV features as surrogates of short term HRV: a case study on mental stress detection in real life. BMC Medical Informatics and Decision Making. 2019; 19: 1–13.
[72]
Ko LW, Chikara RK, Lee YC, Lin WC. Exploration of user’s mental state changes during performing brain-computer interface. Sensors. 2020; 20: 3169.
[73]
Alzyoud A, AlShorman O, Masadeh M, Alkahtani F, Abdelrahman RB. Learning and memory under stress: a review study with evaluation techniques. Systematic Reviews in Pharmacy. 2021; 12: 1602–1610.
Publisher’s Note: IMR Press stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Share
Back to top