EEG Mental Stress Assessment Using Hybrid Multi-Domain Feature Sets of Functional Connectivity Network and Time-Frequency Features

Exposure to mental stress for long period leads to serious accidents and health problems. To avoid negative consequences on health and safety, it is very important to detect mental stress at its early stages, i.e., when it is still limited to acute or episodic stress. In this study, we developed an experimental protocol to induce two different levels of stress by utilizing a mental arithmetic task with time pressure and negative feedback as the stressors. We assessed the levels of stress on 22 healthy subjects using frontal electroencephalogram (EEG) signals, salivary alpha-amylase level (AAL), and multiple machine learning (ML) classifiers. The EEG signals were analyzed using a fusion of functional connectivity networks estimated by the Phase Locking Value (PLV) and temporal and spectral domain features. A total of 210 different features were extracted from all domains. Only the optimum multi-domain features were used for classification. We then quantified stress levels using statistical analysis and seven ML classifiers. Our result showed that the AAL level was significantly increased (p < 0.01) under stress condition in all subjects. Likewise, the functional connectivity network demonstrated a significant decrease under stress, p < 0.05. Moreover, we achieved the highest stress classification accuracy of 93.2% using the Support Vector Machine (SVM) classifier. Other classifiers produced relatively similar results.


Introduction
Mental stress has become a catchphrase nowadays, affecting almost everyone, due to the increasing demands in the workplace, life burdens, changing lifestyles, and technological interventions. The long-term effects of stress not only impact health issues, such as heart disease, obesity, diabetes, stroke, and depression [1][2][3], but have economic consequences too. The economic losses can reach up to billions of dollars [4]. Thus, researchers are trying to detect mental stress at its early stage to prevent it from becoming chronic. The evaluation of human psychological stress usually performed using subjective or objective measurement methods. The subjective stress assessment methods used psychological assessment approaches, such as a clinical interview and psychological-based questionnaires, such as the Trier Social Stress Test (TSST) [5,6], Perceived Stress Scale (PSS) [7][8][9], State-Trait Anxiety Inventory (STAI), and Hospital Anxiety and Depression Scale (HADS) [10].
The drawback of subjective methods is that it is subjective to the user's reported answers, and it only describe the current state of the subject's stress level. Recent studies can eventually produce effective alarms for the current mental state. As a result, studies presented by Attallah [34] and Hasan [43] revealed that hybrid feature sets from various domains (time domain, frequency domain, and time-frequency domain) may enhance the overall classification of EEG emotion analysis. To the best of our knowledge, no study on fusing such domains with functional connectivity network features has been done. In contrast to the majority of cortical activation features, which focus on a single channel feature, functional connectivity features look for relationships and interactions across different regions of the brain (inter-channel relations). This knowledge aids in a better understanding of how the brain functions and could offer more accurate representations of mental stress states. To address the aforementioned limitation, this study aims to investigate the fusion of functional connectivity network features with cortical activation features from the time and frequency domains to detect mental stress in order to aid in the development of wearable devices. In contrast to prior research, our objective is to combine single-channel features with inter-join channel features (connectivity). Thus, we employ a well-established clinical assessment method using salivary alpha amylase (cortisol measure) to enhance the labeling of the task given. We then propose an objective method based on the machine learning framework to classify stress levels with a minimum number of EEG channels. We present a novel methodology to identify mental stress by investigating the statistical difference between stress and rest conditions. The proposed method is analyzed and evaluated using seven classifiers [36], namely: KNN, RF, Logistic Regression (LR), SVM, classification and regression Decision Tree (CART), Linear Discrimination Analysis (LDA), and NB. The accuracy, precision, recall, and F-score matrices were used to evaluate the performance of the classifiers.
The following section summarizes our contributions in this work.

1.
Developing an experimental protocol to induce two levels of mental stress (stress/rest or control) in a short time, which is important for real-life application.

2.
A multi-domain feature set is proposed by fusing features from the time domain, frequency domain, and functional connectivity networks.

3.
A feature selection method was implemented to select the most discriminative feature sets. 4.
The performance of the proposed method is tested and evaluated using seven machine learning classifiers.
The rest of the paper is organized as follows: Section 2 describes the dataset, protocol setup, and data annotation. Section 3 explains the detailed methodology. In Section 4, the classification evaluation method is presented. In Section 5, results and analysis are discussed in detail. In Section 6, a discussion of the results is provided, and the study's conclusions are presented in Section 7.

Participants
In this dataset, the total number of participants was 22 subjects (aged 26 ± 4 with head size of 56 ± 2 cm). All subjects were male right-handed healthy adults having the same culture and background (undergraduate students). The participants were asked about their medical condition to fit the experiment eligibility. Smokers and drug users were excluded due to their effect on the sympathetic nervous system. Moreover, participants must have no history of any physical or mental health problems. Several rules had been imposed on them before starting the experiment. For example, no eating or drinking two hours before the experiment and no physical activity occurred [13]. The experiment time was chosen between 4.00 and 5.30 p.m. to reduce the circadian rhythm's effects on cortisol collection. The experiment protocol was approved by the institute review board of University Teknologi Petronas.

Stress EEG Measurement and Protocol
The experiment task protocol was based on the Montreal Imaging Stress Task (MIST), which was described in detail in [44]. The task was created using MATLAB and presented using a Graphical User Interface (GUI). It involved a mental arithmetic task (MA) using simple calculation of two-digit integers (ranging from 0 to 100) with operands restricted to +,−, and (/ or *) (example 99/3 − 76 + 51). The answer for each question was displayed in the GUI using a numerical order ranging from '0' to '9', and participants were trained to select the correct answer with a mouse click. The experiment task was performed in three subsequent phases: preparation, rest condition, and stress condition. Each phase is described in detail below. In the preparation phase, participants were given five minutes to practice the MA task, and the average time taken to answer the questions was recorded for each participant, which would later be utilized as a time constraint to induce stress.
In the stress phase, a cap of EEG electrodes was placed on the frontal region of each participant's scalp, and simultaneous measurement was performed while the participant solved the arithmetic within a time limit (derived based on a 10% reduction from the average time recorded during the preparation phase). Additionally, the average peer performance was displayed on the screen as a real-time performance indicator of subject's performance compared to other participants. Notification of a negative message for each response that exceeds the time limit or gets the answer wrong, i.e., a message of "Incorrect", or "Time's up" being flashed on the screen. The negative feedback was intended to add more stress to the participants.
In the rest phase, the participant was instructed to keep calm and relax while looking at the fixation cross presented at a computer monitor. The presentation of the stress and rest states was in a block design. There was a total of five blocks in each of the stress and rest conditions, as shown in Figure 1. For every block, an arithmetic task popped up for 30 s to induce stress, followed by 20 s of rest. During the 30 s of the stress task, multiple mathematical questions were displayed on the computer monitor based on participants' response time in answering each question. For the 20 s of a rest condition, the participant looked at the fixation cross in the computer screen as a visual cue for the trial onset. Figure 1. Experiment block design. A total of five active blocks for each task with salivary alpha amylase (SAA) cortisol was collected before and after the stress task and presented by the letter S with a red background. For each block, arithmetic tasks are given for the 30 s followed by 20 s of rest. The red dashed line marks the start of the task, and the green dashed line marks the end of the task (the marking is done at every block).
The EEG signals were recorded using the Discovery 24E system (BrainMaster Technologies Inc, Bedford, OH, USA). The system was equipped with 7-electrodes (Fp1, Fp2, F7, F3, F4, Fz, F) placed on the prefrontal cortex, as shown in Figure 2. The EEG electrodes were referenced to the earlobe electrodes (A1 and A2). The placement of the EEG electrodes was based on the 10-20 system and was sampled at 256 Hz.

Dataset Labelling
The EEG signal has been labeled for each subject based on the cortisol of the salivary amylase level (AAL). During the experiment, two samples of AAL were obtained, as shown in Figure 1. The first AAL sample was collected before starting the experiment task (stress/rest condition) as a baseline. The first AAL result was supposed to show the initial state of the subject as not stressed; otherwise, the subject would be removed from the study. The second AAL sample was collected at the end of the experiment. The data annotation/labeling of the EEG signal was based on the cortisol level; medically, cortisol levels greater than 60 micrograms per decilitre (mcg/dL) indicate that the subject is stressed, while those between 30 and 60 (mcg/dL) are labeled as working brain condition, and those less than 30 (mcg/dL) are labeled as the rest state [44,45].

EEG Base Mental Stress Analysis Method
This section describes the proposed methodology process for implementing the stress detection method, namely signal preprocessing, feature extraction and selection, and classification, as shown in Figure 3.

Signal Preprocessing
The raw EEG signals were preprocessed using Python and an external MNE package [46]. The raw EEG signals were band-pass filtered using a finite impulse response (FIR) filter with 1 Hz to 35 Hz bandwidth. Since we only measured the frontal cortex, the EEG data were re-referenced to the average reference as suggested by [47]. Consequently, the noise caused by 50/60 Hz of line power was omitted. Furthermore, Fast-ICA has been used to eliminate the associated noise caused by eye blinking called electrooculogram (EOG) artifacts under 4 Hz, muscle artifacts (EMG) with frequency beyond 30 Hz, and heart rate [48]. Fast-ICA has the significant ability of denoising ocular artifacts (OAs) that exist in low frequencies less than 16 Hz, therefore delineating the overlapping frequency bands [49]. The EEG signals were segmented into 1000 ms EEG epochs relative to the target task. The selection of 1000 ms or 256 EEG data points was due to its stationarity at an epoch size of >256 for experiments involved in event-related potential. This number of data points is appropriate to show the stationarity of EEG signals and have been reported in previous EEG studies with a comparable data point [50][51][52]. The baseline was extracted and omitted using the full length of each epoch. Then, all EEG epochs were visually double-checked to eliminate data segments contaminated with noise. Lastly, we identify from the clean EEG signals two mental states (stress and rest). The first 20 s of rest from the first block were considered for the rest state, and another 20 s from the last stress block (block 5) were considered for the stress condition. The two states were labeled based on the results obtained from the cortisol data collection of AAL.

Feature Extraction
Feature extraction is a crucial step in analyzing and classifying EEG signals [43]. Because the EEG signal is a non-stationary and time-varying signal, choosing an appropriate technique to extract useful features that reflect brain activity is critical for reducing dimensional space, improving processing performance, and increasing the detection rate. EEG features can be broadly categorized into single-channel features and multi-channel features. The majority of the existing features are computed on a single channel that involves temporal and or spatial information from a specific brain region, e.g., statistical features, frequency-domain features, e.g., PSD. A few multi-channel features are computed to reflect the relationships between different brain regions, e.g., brain connectivity features. The EEG signal comes from a complex of interconnected brain neurons. Hence, the fusion of the brain connectivity with cortical activation features may provide us with a more exact model of the brain and how its various areas interact with each other. In this paper, both cortical activation features (single-channel features) and functional connectivity network features (multi-channel features) have been employed.
In particular, twelve (single-channel) features were extracted from both the time domain and frequency domain of the cleaned EEG signals for each of the seven channels (Fp1, Fp2, F7, F3, F4, Fz, and F8) located at the prefrontal and frontal region of the brain. Those EEG features were six features per EEG channel from the time domain: kurtosis, peak-to-peak amplitude, skewness, and Hjorth parameters of activity, complexity, and mobility. Likewise, six features per EEG channels were extracted from the frequency domain of relative powers for frequency bands: delta δ, theta θ, alpha α, sigma σ, low beta β, and high beta β. Additionally, a total of 126 features (multi-channel features) were extracted from the connectivity network of all channels. The EEG signal's length used for feature extraction methods was 40 s (20 s stress, 20 s rest), segmented by the epoch of 1 s, which results in a total of 40 segments, and each segment consists of 210 features per subject for both stress and rest tasks. Table 1 shows the summary of dataset content. Each of the domain's features was explained in detail in the following subsections.

Time-Domain Features (TDFs)
The TDFs were calculated from the cleaned EEG signals at each epoch. The TDFs are also called statistical features widely used in the classification of EEG signals to measure the irregularity of signal amplitude in the time domain. Therefore, several studies employed TDFs in emotion [29] and stress classification [37,39]. In this paper, six statistical features were extracted from the time domain, namely: kurtosis, peak amplitude, skewness, and Hjorth parameters of activity, complexity, and mobility. Each of these features was extracted from each channel per subject. The full details of these parameters are given below.
Kurtosis: is the measure of the relative flatness of an EEG signal distribution per segment (epoch), and it is calculated using the equation.
where T is the number of epochs , x(t) is time-series sample points, and µ, σ are the mean and standard deviation of the signal. Skewness: measures the distribution difference between the mean and the median for each variable of epochs.
Peak-to-peak amplitude (ptp_amp): the change between the peak of the highest amplitude value and the lowest amplitude value among the various time windows.
Hjorth parameters: three features of Hjorth Parameters (TDHPs), namely activity, mobility, and complexity of the signal, are extracted, which are useful for the quantitative evaluation of an EEG signal and can be expressed as: • Hjorth Activity: The activity measure represents the signal power and measures the variance of a time function using the equation.
where x(i) represents the signal on time.
• Hjorth Mobility: mobility represents the mean frequency or the proportion of the standard deviation of the signal and is denoted by: where mobility represents the square root of the variance of the first derivative of the signal x(t) divided by the activity. • Hjorth complexity: the complexity parameter gives an estimate of the bandwidth of the signal, which indicates the similarity of the shape of the signal to a pure sine wave.
All these extracted features were then fed as an input to the classifiers.

Frequency-Domain Features (FDFs)
In the frequency domain, the multitaper method is used to estimate the power spectral density (PSD) because it provides a more robust spectral estimation than the classical methods and Welch's periodograms [53]. Compared to Welch's approach, the multitaper method does not need to identify a window duration because it computes the periodogram on the whole signal and provides a high-frequency resolution and low variance [53].
Multitaper spectrum estimation (MSE): a Nonparametric method used to estimate PSD from a combination of multiple orthogonal tapers (or "windows"). MSE aims to recover the information lost when using a single taper and offers significant performance gains over a nonparametric single taper. The estimator is the average of the K direct spectral estimators, each acting on the whole data record (rather than on a signal segment, as happens in the Welch method) and applying different tapers. Each (partial) estimator is computed by: Let x(t), for t = 0, 1,..., N 1, be a zero-mean time series with unit sampling and spectral density S(f), ∆t is the sampling interval, h i,k is the kth data taper, and the bandwidth for ∆t is 1 s.

Functional Connectivity Network
The functional connectivity network is generated by measuring the connection between electrode pairs in each frequency band using Phase Locking Value (PLV). The PLV technique, similar to the conventional coherence method, computes the correlation between two pairs of EEG channels in distinct frequency bands. The PLV is an effective measure of brain functional signals due to its ability to quantify locking between the phases of the signals from two distinct electrodes and does not depend on the assumption of stationary signals [54]. Therefore, PLV was proved to be a valid method to investigate task-induced changes in the long-range synchronization of neural activity from EEG data [55]. To calculate the phase-locking value, we extract the instantaneous phase φ a i (t) of the analytical signal x a i (t)of the time series x i (t). Then, for each pair (i, j) of EEG channels, we compute the modulus of the timeaveraged phase difference projection onto the unit circle and computed it in Equation (9): where N is the total number of trials in time series, and φ i and φ j are the instantaneous phase values at trial index n. The PLV values range between [0, 1], with 0 indicating no phase synchronization and 1 indicating that there is a fixed relative relationship between the two signals in all trials. Because PLV employs undirected measurement for all electrodes, it is known as symmetric measure (PLV(k1, k2) = PLV(k2, k1)).Thus, the direct connection is ignored, and the total number of connections between the EEG channels is measured using: where k is the total number of channels. In this paper, the total extracted connectivity features are 126 features (21 features × 6 bands) since we are using only 7 EEG channels. However, we only utilized the PLV with a phase-difference distribution that was significantly different from zero using t-test feature selection at p < 0.05.

Hybrid Features of Time, Frequency Domain and Connectivity Features
Fusion information from cortical activation (Time and Frequency Domain) and connectivity features might complement each other, giving us a more accurate representation of the brain and how its various regions interact. In this paper, the total features extracted from multi-domain features were 210 features (42 features from time, 42 features from frequency domain, and 126 features from PLV connectivity features), resulting in high-dimensional feature space. Therefore, the significant-features-based channels from the time domain, frequency domain, and connectivity features were identified using a statistical t-test with a 95% confident interval and p = 0.05 level of significance. Thus, the most significant features from each domain were fused to form a new subset of the significant features from the time domain, frequency domain, and connectivity network. The total significant-features-based channels were 42 (15 from the time domain, 20 from the frequency domain, and 64 from connectivity features ) and used as a new fusion feature set to subsequent classifiers.

Classification
To classify and evaluate stress levels, three scenarios have been conducted. First, individual feature of the selected channels within each domain was considered as a bio-marker and evaluated separately (i.e., Hjorth complexity, Hjorth mobility, relative alpha, . . . , etc., see Tables 3-5). In the second scenario , we utilized the features from the selected channels in each domain as a feature vector and classified them separately (i.e., see . Meanwhile, we fused the features of the selected channels from the three domains: time domain, frequency domain, and connectivity network features into a single feature vector and used them as an input to the ML classifiers (see Figure 11). Several machine learn-ing algorithms have been used for EEG signal analysis to train and predict the features extracted from target EEG tasks. In this paper, seven classifiers, namely LR, RF,LDA, KNN, SVM, DT, and NB, were employed to evaluate the model performance of mental stress recognition based on the scenarios mentioned and provide the researchers with useful information about the effective classifier to be considered in future work. Table 2 shows the classifier's tuning parameters utilized. More details about the utilized classifiers can be found in our previous study [56]. The extracted features are split into 80% for training and 20% for testing. In each classifier, an independent subject test with 5-fold cross-validation was performed.  The proposed model's performance has been evaluated using seven classifiers with 5-fold cross-validation and a four-measure matrix. These include accuracy, precision, sensitivity, and F-measure. The equations below show the mathematical formulation for each prediction. The results obtained from the confusion matrix has: Speci f icity = Tn Tn + Fp F-measure = 2 Precision * Sensitivity Precision + Sensitivity Accuracy denotes the measurement of how many correct predictions were made in the whole dataset in two-class problems, i.e., stress and rest conditions. Precision indicates the correct measure of a positive prediction. Meanwhile, sensitivity refers to the completeness measure of a classifier, measuring the number of true stress conditions that get predicted over whole stress labels in the dataset. Specificity measures the proportion of rest conditions that are correctly identified. The F-measure was used to evaluate the detection result using both sensitivity and precision.

Statistical Analysis
The stress inducement using an arithmetic task under time pressure and negative feedback for 22 subjects was evaluated using a salivary alpha-amylase level and EEG. The  Figure 4. The increase in the alpha-amylase level from rest condition to stress condition was significant with a mean p < 0.0001. This also correlates with our previous results [13], which revealed a significant difference in alpha-amylase level between the two conditions across all subjects. Therefore, time pressure and negative feedback prove to be reliable for stress induction in the lab. In EEG signal analysis, an independent-sample t-test was conducted to compare stress and rest for each feature-based electrode. The star symbols are used in topographic maps to show the significant electrodes per feature. For time-domain features, Figure 5a shows the mean and standard deviation of the Hjorth complexity, Hjorth mobility, Hjorth activity, kurtosis, peak-to-peak amplitude (ptp_amp), and skewness of EEG signals at 1-30 Hz for stress and rest conditions, which were taken by averaging all subjects' data for each condition.
The placement of EEG electrodes is coordinated based on the international 10-20 system, as shown in Figure 2. The means of Hjorth complexity, Hjorth activity, and ptp_amp were decreasing from rest condition to stress condition when subjects were exposed to mathematical stressor tasks and increased from rest to stress conditions in Hjorth activity and skewness. This variation in different parameters indicates a further decrease in complexity and ptp_amp from rest to stress conditions but a high increase in the mobility component in the signal. The significant electrodes for time-domain features are shown in Figure 5b, where the color scale represents statistical differences based on t-test values.
The total number of features for each channel is six, giving a total of (7 channels × 6 features) 42 features in the time domain. However, only 15 significant features in the time domain that discriminate the rest and stress conditions were selected and used in this study. The topographic T-map for both complexity and mobility features shows the same significant channels of 'Fp1', 'F3', and 'F4'; significant Hjorth activity channels were 'F7' and 'F3'. Finally, ptp_amp has four significant channels: 'F7', 'F3', 'Fz', and 'F8'. Note that skewness and kurtosis were also selected as a useful feature even though there was only one channel, 'Fp4' and 'Fp1', respectively, for each one, showing a statistically significant difference between the two conditions. This means that the skewness and kurtosis features can offer additional discriminative information between the two conditions. Figure 6 shows the frequency changes on the brain with respect to the stressor test using scale colors of the power distribution of PSD. A statistical analysis of the averaged normalized relative power of the frequency bands (delta, theta, al pha, sigma, low_beta, high_beta) was carried out to demonstrate the difference between rest and stress states. The topographic T-map shows the significant electrodes corresponding to each band with '*' star symbols and the color scale of the T-map. Out of 42 features (7 channels * 6 relative power bands) in the frequency domains, only 20 features were selected as significant features based on t-test values for the experiment task of rest and stress conditions. Figure 5. (a) The mean and standard deviation using scatter for time-domain features of the Hjorth complexity, Hjorth mobility, Hjorth activity, kurtosis, peak-to-peak amplitude (ptp_amp), and skewness of EEG signals at 1-30 Hz for stress and rest conditions. The difference between stress and rest is shown using T-maps in (b). The star (*) symbols denote statistically significant electrodes using topographic maps (two-sample t-test; p < 0.01, Bonferroni correction). Figure 6. The mean topographic maps for relative bands power of delta, theta, alpha, sigma, low beta, and high beta at 1-30 Hz for rest and stress conditions. The difference between stress and rest relative powers are shown using Tmaps. The star (*) symbols denote to the significant electrodes related to specific feature (two-sample t-test; p < 0.01, Bonferroni correction).
High beta β(20-30 Hz) showed a significant decrease from the rest condition to the stress condition across all participants with (p < 0.001). Consequently, a noticeable significant decrease in the alpha α relative power (8-12 Hz) was found in the right cortex of the frontal area for the mathematical stressor tests from the rest condition to the stress condition. Likewise, theta θ (4-8 Hz) relative power indicated a slightly significant increase in stress conditions compared to rest conditions. The overall statistical analysis of the average relative power was shown to be discriminative among stress and rest conditions in all significant electrodes with p < 0.0001 in alpha and high beta and p < 0.001 in delta and sigma (12)(13)(14)(15) Hz) with p-value 0.05. Interestingly, the prefrontal right cortex channels ('Fp1', 'Fp2', and 'F4') were shown to be more significant in most relative power bands to distinguish rest and stress conditions. Similarly, Figure 7 shows the functional connectivity network features of PLV, which measures the changes (increase/decrease) in the connectivity network between two pairs of channels. The PLV was extracted from six frequency bands of both tasks (rest/stress). The significant channels denoted either an increase or decrease (*+/*−) in the connectivity network measurements from the rest condition to the stress condition. From Figure 7, it can be seen that significant functional connectivity networks in delta and alpha decreased from the rest condition to the stress condition. On the other hand, high beta shows an increase in the connectivity network from the rest condition to the stress conditions. Other bands showed increases and decreases in the connectivity network between different brain regions. The significant discrimination connectivity features between stress and rest conditions were selected using a t-test and fused with other significant features from the time and frequency domains.

Classification Results
The overall classification performance results in terms of the average accuracy/ precision/recall/f-score and standard deviations of the proposed methods with the types of classifiers are presented in Table 3 for time-domain features, in Table 4 for frequencydomain features, and Table 5 for connectivity network features. Those average accuracies were evaluated for the seven classification algorithms with respect to the number of channels selected by the t-test. From the time-domain features in Table 3, we obtain the following significant findings:

•
The best classification accuracy was obtained by using the peak-to-peak amplitude feature with four channels ('F7', 'F3', 'Fz', and 'F8') of the frontal region with a mean accuracy of 79.4% using Random Forest and 76.1% using SVM. Meanwhile, the rest of the classifiers achieved an average accuracy of 75% for ptp_amp.

•
The Hjorth parameters of complexity, mobility, and activity achieved a result of an average of 69.1%, 71.5%, and 71.8% using KNN, SVM, and NB, respectively. The significant channels of Hjorth complexity and mobility were located in the prefrontal cortex ('Fp1', 'F3', and 'F4'), while Hjorth activity had only two significant channels that were selected from the left frontal cortex of ('F7' and 'F3'). • Features with a low number of channels tends to achieve low accuracy due to low spatial resolution. Kurtosis and skewness got one significant channel for each and obtained a maximum average accuracy of 55% and 56%, respectively, for 'Fp1' and 'F4'. Furthermore, significant findings from frequency-domain features in Table 4 were elaborated below.

•
The highest average accuracy achieved by the relative power of the high beta band (20-30 Hz) with significant channels 'Fp1', 'Fp2', 'F3', and 'F4' was 73% accuracy with KNN and 71% with both RF and SVM. • For the lower frequencies of delta (1-4 Hz) and theta (4)(5)(6)(7)(8), the significant selected channels were located in the prefrontal and middle frontal cortex area of the scalp-'Fp1', 'Fp2', 'F3', and 'F4'. Both achieved an average accuracy of 68% using SVM and KNN, respectively. • The lowest accuracy obtained in frequency-band features was 52.4% from sigma relative power with only one channel of 'F7'. • Likewise, the average accuracy of alpha relative power and low betas were 63.4% and 64.5% with KNN and LDA, respectively.
The overall observation of significant selected channels for both time-domain and frequency-domain features was observed in 'Fp1', 'Fp2', 'F3', and 'F4'.  Table 5 presents the classification performance of each significant PLV of the connectivity frequency bands. The highest accuracy achieved by PLV bands were 0.752 ± 0.144, 0.734 ± 0.145, and 0.719 ± 0.177 for PLV's of delta, high beta, and alpha, respectively, using LDA. The rest of the PLV bands got an average accuracy of 0.65 ± 0.12. We further classified each subset of significant features of the time domain, frequency domain, and connectivity features as feature vectors and passed them to the classifiers. Figure 8 shows the average accuracy of 15 significant time-domain features and achieved a high accuracy of 81.4% and 80% using RF and SVM, respectively, while other classifiers achieved an average of 76.4%. Figure 9 represents the average accuracies of 20 significant features of relative powers in the frequency domain. The highest accuracy of 80% was obtained by SVM, and 74% was the average accuracy of the other classifiers. Similarly, Figure 10 shows the results of 29 significant features from the connectivity network of PLV, and the average performance accuracy obtained was 88% with SVM and RF, while the rest of the classifiers achieved an average of 84%. Meanwhile, Figure 11 presents the average classification result of 64 hybrid significant features from the time domain, frequency domain, and functional connectivity network, as shown in Tables 3-5.     as well as after their fusion. In summary, these results show that SVM achieved the best classification performance when fusing connectivity features with cortical connectivity features, scoring 93.2%, 92.4%, 92.5%, and 92.1% for accuracy, precision, recall, and f1-score, respectively. Overall, fusing the multi-domain feature set from cortical and connectivity features improves the classification performance by 13% compared to a single subset domain alone.

Discussion
This study has presented a methodological approach based on the fusion of multidomain EEG features and ML for the sake of mental stress classification. To the best of our knowledge, this is the first EEG study on stress that fused functional connectivity features with temporal and spectral features. For this aim, an experimental paradigm based on MIST was designed to induce mental stress and rest conditions using mathematical task with time pressure and negative feedback. For the comparison between the two conditions, a valid objective measurement using the alpha-amylase level (AAL) was collected from the saliva of each subject under both conditions (rest/stress) and quantitatively analyzed, as shown in Figure 4. We found that induced stress revealed a significant difference in AAL between the rest and stress conditions across all subjects, with a considerable increase in AAL from the rest condition to the stress condition. This study correlates to prior findings [13,57] of utilizing arithmetical tasks to induce mental stress in the laboratory setting.
Compared to previous stress detection methods, the main contributions of the proposed method are exploiting the different feature extraction methods and analyzing the significant corresponding channels. For the identification of mental stress in EEG, three scenarios for feature analysis were conducted: The first scenario analyzed features of the time domain, frequency domain, and functional connectivity network separately, as shown in Tables 3 and 4 and Figure 7. Prior to the analysis, only significant channels were selected for classification. The selection of significant channels in all types of features was based on a statistical t-test at p < 0.05. The second scenario was based on combining the significant features within the time domain, frequency domain, and connectivity features of PLV to form subset feature vectors for classification (Figures 8 and 9). The third scenario was based on the fusion of the significant features from all domains (time domain, frequency domain, and connectivity network features) to form a single hybrid subset feature vector for subsequent classifiers.
In particular, for the temporal features of Hjorth complexity, Hjorth activity, ptp_amp, and kurtosis, we found a significant decrease from the rest condition to the stress condition. The decrease in the temporal activities within stress conditions indicates that participants experience difficulties in engaging with the MA task. In fact, the greater the complexity value is, the more active the brain is. Previous studies have found that higher complexity meant increased behavioral performance [58,59]. In line with that, the decreased complexity in our study is a sign of decreased behavioral performance (accuracy of detection) due to stress. It should be noted, however, that the decrease in brain activity/complexity in our study was localized to a certain brain region. For example, when the temporal features of Hjorth complexity are considered, the left frontal region at 'Fp1' and 'F3' is highly reduced under stress. This reduction is consistent with the previous emotion study that utilized videos to induce negative emotions in the participants [60]. Likewise, when the complexity and skewness are considered, the right frontal region at 'FP2' and 'F4' is highly reduced. This is also consistent with our previous studies that utilized simple arithmetic tasks with time pressure to induce stress [13,27].
On the other hand, we found that the relative EEG power in theta, alpha, sigma, and beta showed a significant increase from the rest condition to the stress condition at a particular region of the brain. Considering all of the relative powers together, we found that the right hemisphere was highly sensitive to stress exposure. This confirms that negative emotions are induced under stress. This is in line with previous studies that showed when the stress level increased, the alpha power increased across the frontal cortex [44,57,61,62]. Likewise, the increase in relative beta power in our study is also consistent with previous studies that utilized driving and public speaking as stressors in their studies [39,63]. These findings demonstrate the potential of using temporal, spectral, and connectivity features in finding patterns associated with mental stress, as demonstrated in our previous studies on stress and control states [64,65].
We further analyze the classification accuracy of stress based on the first scenario using CAR, KNN, LDA, LR, NB, RF, and SVM classifiers. The temporal features of the peak-to-peak amplitude of the significant channels-'F7', 'F3', 'Fz', and 'F8'-showed the highest classification accuracy of 79.4% using SVM. Meanwhile, the frequency-domain features of the high beta band (20-30 Hz) at significant channels of 'Fp1', 'Fp2', 'F3', and 'F4' achieved the highest classification accuracy of 73% using KNN.
Meanwhile, in the second scenario (domain feature subset analysis), we observed a 2%, 7%, and 13% improvement in classification accuracy in the time domain, frequency domain, and connectivity features, respectively, when compared to the first scenario. Particularly, the high accuracies of 81.4%, 80% and 88% were achieved when using the significant feature subset of the 15 time-domain features, 20 frequency-domain features, and 29 connectivity network features, respectively. It is noteworthy that the subset of connectivity features outperformed other domains in classifying mental stress. Our findings are consistent with prior functional connectivity research, which has shown that functional connection is more reflective of the mental task performance [66].
Additionally, in the third scenario, fusing significant features of the time domain, frequency domain, and connectivity features of PLV (a total of 64 features) improved the overall accuracy of detecting the rest/stress condition with the highest accuracy of 93.2% obtained using SVM. As expected, the improvements in the classification performance support the hypothesis that fusing multi-domain features may provide complementary information for better stress detection. In general, the proposed method of selecting a significant EEG-channel-based feature yield a total reduction of feature space of almost 60%, with 64 significant features out of 210 features.
The overall classifiers' performance depends significantly on relevant EEG features and the selected channel related to the given task. Previous studies have found that using a large number of EEG channels could provide high resolution and improve accuracy; however, they have inherited issues, such as cost and applicability, particularly outside laboratories. Subhani [57] discusses the identification of stress using 19 EEG channels with features of absolute power, relative power (RP), coherence, phase lag, and amplitude asymmetry, and they reported high accuracy of 94.58%; yet, high dimensionality existed when the 190-feature vector was used. This high accuracy could be interpreted as the result of using a high spatial resolution of 19 EEG channels. However, in this study, the maximum accuracy was 93.2% with the 64-feature vector. Although the accuracy was slightly lower than the one reported by [57,63], this study efficiently reduced feature space with high performance.
This study confirmed that the fusion of temporal, spectral, and connectivity features significantly improved mental stress classification accuracy. Although the study was informative for the mental stress classification, it had a few limitations. First, we only reported the results of EEG feature extraction at an epoch length of one second, which corresponds to 256 EEG data points. Future studies may consider reporting the results of epochs with more than one second, i.e., in the range of one to ten seconds. Second, this study was constructed on fusion functional connections using PLV with cortical features. Other connectivity features, such as the Phase Lock Index (PLI), Partial Directed Coherence (PDC), and Directed Transfer Function (DTF) [54], were not included in the study. Third, while we conducted statistical analysis with a t-test to select the brain regions relevant to mental stress in this study, different methods for detecting mental stress using featurebased channel selection (e.g., swarm intelligence) should be considered in future work to reduce the high dimensionality and select the optimal feature set. Finally, throughout the experiment, we found that the SVM outperformed other classifiers in terms of classification performance using the selected hyperparameters, but using algorithm optimization for finding optimal parameters could improve the overall performance.
In essence, the proposed framework empirically proved the possibility of having significant channels corresponding to each feature while eliminating the redundancy and ignoring un-relevant channels. Then, it could be suggested that EEG signals have the potential to be reliable for identifying stress for home-based applications with an optimal number of channels and the relevant features. However, multiple methods for detecting mental stress using feature-based channel selection should be considered in future work.

Conclusions
This paper aims to find feature sets that would distinguish the stress and non-stress conditions using seven frontal EEG channels. EEG's features from the time domain, frequency domain, functional connectivity network, and all three fused together were investigated. Seven classifiers were used to evaluate the performance of each feature set before and after fusion. The highest accuracy of 93.2% was achieved using hybrid features with the SVM classifier. In comparison, the evaluation performance of the time domain, frequency domain, and connectivity feature subsets were 81.4%, 80%, and 88% respectively. The results demonstrated that the proposed method of fusing the connectivity network with temporal and spectral features was capable of detecting mental stress state with high classification performance. The overall results support developing a real-time system for stress measurement and analysis.

Institutional Review Board Statement:
The study was conducted according to the guidelines of the Declaration of Helsinki, and approved by the Institutional Review Board of Universiti Teknologi Petronas.
Informed Consent Statement: Informed consent was obtained from all subjects involved in the study.

Data Availability Statement:
Raw EEG data can be obtained by writing formal email to Fares Al-Shargie.