**3. Methodology**

We devised a supervised machine learning model for the classification of human stress (Figure 1). A total of 33 volunteers participated in this study. The resting state EEG data for each participant were acquired using an EMOITV Insight headset (https://www.emotiv.com/insight/) in a closed eye condition for three minutes. After EEG signal recording, participants were asked to fill in the PSS-10 questionnaire followed by an interview with the psychology expert. The average time for the interview was 25 min. Based on the PSS scores and interview, the psychology expert grouped each participant in either the stress or the control group.

**Figure 1.** The proposed methodology for long-term human stress classification.

The recorded EEG signals were made noise free in the pre-processing stage. Neuro-physiological features including alpha (*α*), low beta (*βl*), beta (*β*), gamma (*γ*), delta (*δ*), theta (*θ*), and relative gamma (RG) power were extracted from the signals at each electrode. Frontal and temporal alpha and beta asymmetries, and alpha asymmetry was calculated from these features. Five supervised machine learning algorithms (SVM, NB, KNN, LR, and MLP) were used to classify human stress. Two different labeling methods were used, including the perceived stress scale and expert evaluation, where the PSS and interview scores were simultaneously used. A detailed description of these methods is presented in the following subsections. The flow of events during the data acquisition process is shown in Figure 2.

**Figure 2.** Experimental sequence and the data acquisition process.

#### *3.1. Data Acquisition*

All EEG recordings were performed in a noise free lab using the EMOTIV Insight headset, which records brainwaves and provides advanced electronics that are optimized to produce clean and robust signals. Its data transmission rate is 128 samples per second, which provides the ability to perform an in-depth analysis on the brain activity. It has a minimum voltage resolution of 0.51 volts least significant bit (LSB) with 5 EEG electrodes at *AF*3, *AF*4, *T*7, *T*8, *Pz* locations and 2 reference electrodes. The headset is shown in Figure 3 with the five electrodes highlighted for reference. The device uses 14 bits for quantization, where 1 LSB = 0.51 μV. A 16-bit analog to digital conversion (ADC) is used, where 2 bits of instrumental noise floor are discarded. The reference electrodes CMS/DRL were located on left mastoid bone. The participants were asked to close their eyes for a duration of three minutes and were instructed to keep their head still to reduce movement artifacts. This also helped in minimizing the muscular motion and reduce these artifacts, since we recorded data at the frontal

electrodes. A closed-eye condition was used, since correlates of long-term stress have been found in this condition in previous studies [10,33]. Another advantage of using the closed eye condition is the minimization of eye blink artifact. EEG signal acquisition was performed using the EMOTIV Xavier TestBench v.3.1.21. EEG signals were recorded from the scalp of participants while they were seated in a comfortable chair. Our experiments were specifically carried out in the afternoon (between 3–5 pm) to comply with similar studies where the circadian rhythm was assumed to be similar at this time period for the participants.

**Figure 3.** The Emotiv headset with five electrodes marked at positions *AF*3, *AF*4, *T*7, *T*8, *andPz*.
