Next Article in Journal
Identification of Language-Induced Mental Load from Eye Behaviors in Virtual Reality
Next Article in Special Issue
Traffic Management in IoT Backbone Networks Using GNN and MAB with SDN Orchestration
Previous Article in Journal
Three-Dimensional Shape and Deformation Measurements Based on Fringe Projection Profilometry and Fluorescent Digital Image Correlation via a 3 Charge Coupled Device Camera
Previous Article in Special Issue
A Cluster-Based Energy-Efficient Secure Optimal Path-Routing Protocol for Wireless Body-Area Sensor Networks
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Efficient Feature-Selection-Based Stacking Model for Stress Detection Based on Chest Electrodermal Activity

1
Department of Computer Engineering and Networks, College of Computer and Information Sciences, Jouf University, Sakaka 72388, Saudi Arabia
2
Faculty of Information and Communication Studies, University of the Philippines Open University, Los Baños 4031, Philippines
3
Center for Computational Imaging and Visual Innovations, De La Salle University, Manila 1004, Philippines
4
College of Computing and Information Technologies, National University, Manila 1008, Philippines
5
Department of Computer Science, COMSATS University, Islamabad 22060, Pakistan
*
Author to whom correspondence should be addressed.
Sensors 2023, 23(15), 6664; https://doi.org/10.3390/s23156664
Submission received: 17 June 2023 / Revised: 10 July 2023 / Accepted: 18 July 2023 / Published: 25 July 2023
(This article belongs to the Special Issue Advanced Technologies in Sensor Networks and Internet of Things)

Abstract

:
Contemporary advancements in wearable equipment have generated interest in continuously observing stress utilizing various physiological indicators. Early stress detection can improve healthcare by lessening the negative effects of chronic stress. Machine learning (ML) methodologies have been modified for healthcare equipment to monitor user health situations utilizing sufficient user information. Nevertheless, more data are needed to make applying Artificial Intelligence (AI) methodologies in the medical field easier. This research aimed to detect stress using a stacking model based on machine learning algorithms using chest-based features from the Wearable Stress and Affect Detection (WESAD) dataset. We converted this natural dataset into a convenient format for the suggested model by performing data visualization and preprocessing using the RESP feature and feature analysis using the Z-score, SelectKBest feature, the Synthetic Minority Over-Sampling Technique (SMOTE), and normalization. The efficiency of the proposed model was estimated regarding accuracy, precision, recall, and F1-score. The experimental outcome illustrated the efficacy of the proposed stacking technique, achieving 0.99% accuracy. The results revealed that the proposed stacking methodology performed better than traditional methodologies and previous studies.

1. Introduction

In the current century, wearable equipment has gained importance. Wearable gadgets such as smartwatches, eyeglasses, chest bands, prosthetics, and implants are placed on the human body [1,2,3,4]. Wearable sensors have been used for many healthcare applications such as human activity recognition, stress detection, cognitive health assessment, COVID-19 detection, cardiovascular diseasedetection, human fall detection, Parkinson’s disease detection, etc. [5,6,7,8,9,10,11,12]. Wearable technology is just one aspect of the larger Internet of Medical Things (IoMT) ecosystem [13,14,15,16,17,18]. The IoMT incorporates different medical devices and technologies that can connect online and gather and distribute data for medical purposes. The IoMT includes stationary devices such as hospital screens and imaging equipment, implantable cardiac and insulin pumps, and ambient devices such as smart beds and detectors. Together, these devices collect and transmit data, which can be utilized to monitor patients’ health, identify ailments, and design personalized treatment plans for them [19,20,21]. With wearable technology, precise and durable data estimation is feasible, and this information can be utilized to estimate different factors of human fitness, such as stress status. By collecting information on irregular heartbeats, bedtime habits, and bodily movements, wearable equipment can help individuals manage stress effectively [22,23,24,25,26,27].
Stress-related health issues are becoming more prevalent worldwide and seriously impact people’s mental health and quality of life [28]. Stress is a deadly disease that worsens several dangerous conditions, such as diabetes, cardiovascular disease, and hypertension. The British Health and Safety Executive reported that, in 2021–2022, stress was the main reason for 50% of all occupational diseases [29]. Tension or a powerful sense of anxiety is a sign of distress, a detrimental form of stress. Reduced performance and mental fogginess are side effects of stress. Chronic or severe illnesses can also cause pain that is very difficult for the body and brain to handle, leading to depression and other physical and mental health problems [22]. Short-term stress may not necessarily harm young and healthy people with an adequate protection mechanism in place. Nevertheless, if the disturbing scenario is too often or intense, this might increase the risk of producing pathological diseases associated with stress and depression [30]. A stroke or cardiac arrest can be brought about by short-term stress. On the other hand, long-term stress is known to increase the risk of serious conditions such as coronary artery disease, high cholesterol, diabetes, and obesity [22]. Stress can have a major harmful effect on physical and mental health if it persists. In the biomedical field, self-reported surveys such as the Perceived Stress Scale (PSS) [31] and State-Trait Anxiety Inventory (STAI) are used to measure the psychological perception of stress [32]. Observing physiological responses to stress with detectors is another procedure to quantify the stress status. Pursuing this technique daily for frequent assessment is impossible because it demands time.
Currently, a large number of people are experiencing stress for various reasons. Problems in one’s personal or professional life, an overwhelming workload at work or school, and several other sources of worry are examples of these reasons. Long-term stress exposure can cause severe mental diseases, persistent fatigue, decreased activity, a compromised immune system, and chronic exhaustion. Such disorders can cause sufferers to lose their effectiveness and become ill and even represent a moral and physical threat to others. Employers, educators, coworkers, and friends must be aware of this problem because it could lower productivity among employees and students and lead to a harmful predisposition to other diseases Furthermore, treating such diseases later is more expensive than diagnosing and treating them early. There still needs to be accurate and effective methods for identifying stress. To address this issue, modern technologies such as sensors and machine learning algorithms can save time, money, and human resources. For example, an employer concerned about their employees’ performance should monitor their stress levels, which can lead to reduced productivity and an increased probability of making errors. Implementing machine learning can enhance the quality of diagnostic sensors while reducing the costs of analyses since, with the help of ML, inexpensive and straightforward sensors can outperform expensive ones. Furthermore, detecting overstressed individuals has become highly relevant in light of recent tragic events around the globe.

1.1. Motivation

Healthcare is increasingly adopting AI techniques to improve diagnostics, monitoring, and overall patient care. However, the success of AI algorithms heavily relies on the availability of high-quality and diverse datasets [20,33,34,35]. In the case of stress detection, access to large-scale and labeled datasets is limited, which hinders the development and evaluation of accurate AI models. Our study sought to contribute to the availability of such datasets by utilizing the Wearable Stress and Affect Detection (WESAD) dataset. By conducting experiments and analyzing this dataset, we aimed to provide valuable insights into stress detection using chest-based features. The dataset consists of physiological signals, motion sensors, and self-reported labels obtained from devices worn by participants in various stress-inducing scenarios. By leveraging the WESAD dataset, we can explore the potential of chest-based features in stress detection. These features include the heart rate, respiration, and electrodermal activity, which are relevant indicators of the stress level. Through our analysis, we aimed to uncover patterns, correlations, and discriminative features that can aid in accurately detecting stress using AI methodologies. Different researchers have proposed different techniques to predict stress, such as sensor-based approaches [36] and ML and DL approaches, such as KNNs, RF, Adaboost [37], and CNNs [38], but these studies are limited in their performance. To address all these problems, this research proposes an approach using a machine learning algorithm including logistic regression (LR), linear discriminant analysis (LDA), quadratic discriminant analysis (QDA), and a stacking model by applying chest features from the WESAD dataset.

1.2. Contribution

This study makes stress detection using chest-based data more precise and efficient. The paper’s primary contributions and distinguishing characteristics are listed below:
  • The research presents a stacking model based on three machine learning algorithms (LR, LDA, and QDA) for predicting stress using data from chest-worn sensors.
  • The WESAD dataset, which includes the five states of transitory, baseline, stress, amusement, and meditation, was turned into a suitable format for the proposed framework. Next, we performed feature analysis and selected the optimal features based on statistical measures.
  • The observed outcome illustrated the efficacy of the proposed stacking technique, achieving 0.99% accuracy. The results revealed that the proposed stacking methodology performed better than traditional and previous studies.

1.3. Organization

Section 2 provides the most recent relevant research on wearable sensor-based methodologies, ML, and approaches in the healthcare industry. The proposed approach is discussed in Section 3, which also addresses dataset visualization, data preprocessing, RESP features, data collection, feature analysis (Z-score, feature selection, SMOTE, and normalization), and machine learning algorithms. Section 4 describes the proposed approaches’ evaluation measurements, results, and findings. Finally, Section 5 concludes the research work and offers suggestions for future investigations.

2. Related Work

This section presents the background of previous state-of-the-art (SOTA) techniques used to predict stress, such as wearable-sensor-based, machine learning, and deep learning approaches.

2.1. Wearable-Sensor-Based Methodologies

A major issue with ambient assisted living technologies is automated stress detection. The authors of [36] discuss the findings of two studies that used a chest belt-mounted pacemaker to identify stress. The device verification trial determined the sensor’s dependability by comparing parameters recorded by the belt and heart rate data to data obtained by the gold standard apparatus. They chose highly correlated, low average error data segments of significant measurements of chest data for additional processing utilizing an explicit synchronization and data cleaning technique. The clinical study’s strategy contained two steps that lasted for 10 min: a palliative step and a mentally stressful stage. They created a straightforward technique for identifying stress by operating three-time domain parts of the heart rate motion. According to the results of two state-of-the-art methods used to analyze the exact data, the strategy produced results with an accuracy, sensitivity, and specificity of 74.6, 75.0, and 74.2 percent, respectively. In article [39], the relationship between pain and stress is discussed, as well as methods for measuring and identifying them with the aid of diagnostic implants and worn sensors. Wearable sensors monitor physiological indications, including pulse rates, neural actions, muscle movements, electrodermal activity, breathing speeds, blood volume pulsation, and skin conductance. The authors aimed to develop a wearable health service system technique for stress and pain inspection by examining the wearable detectors used in healthcare equipment.
In [40], the authors present two experiments using a chest belt and a low-cost sensor for stress detection. They measured students’ mental stress one week before an exam and while using the internet. The heart rate and different aspects of the belt were similar to those examined during the device verification inspection, confirming the sensor reliability. Gold standard instruments were used for this comparison. With simple synchronization and data cleaning techniques, the authors chose extremely clustered, low-average information elements with the required chest data time for further analysis. The study’s primary goal was to examine tension throughout students’ college careers. Recruitment should take note of the results of pressure testing or stressing the student. The proposed architecture in [23] was established on attribute extraction from gyroscopic measurements and encourages inexpensive wearable sensors. Heart rate variability (HRV) characteristics and cardiac timing intervals comprise the feature space for assessing a disease’s severity. Modern machine learning (ML) techniques divide severity levels into mild, moderate, and severe categories. With an F1-score of 94.29 percent and an accuracy of 94.44 percent, Light Gradient-Boosted Machine (Light GBM) performed the best. Moreover, evaluations based on game theory were used to study the top attributes and how they generally affect the severity level. The most typical characteristics of AS severity are the isovolumetric contraction time (IVCT) and isovolumetric relaxation time (IVRT).
To further broaden our paper’s scope, we studied relevant works that have explored similar areas in healthcare and AI. The authors of [41] addressed security and authentication challenges in wireless medical sensor networks, which are relevant in ensuring the integrity and confidentiality of data collected from wearable devices. In [42], the authors proposed a fog computing architecture that leverages software-defined networking (SDN) to enable efficient and secure data processing in healthcare applications. This work is relevant as it highlights the importance of infrastructure and networking solutions to handle the increasing volume of data generated by wearable devices and healthcare IoT systems. The authors of [43] presented a knowledge-infused learning framework for cardiovascular event diagnosis. Although the focus of this work is different, it showcases the potential of AI techniques in healthcare and highlights the importance of developing accurate and reliable models for medical diagnostics. Information security has received attention from academic and industrial sectors for data prevention, integrity, and modification. Traditional and mathematical security models address information-related challenges, although they do not guarantee 100% data privacy. Computational intelligence is a powerful technology that draws inspiration from biological evolution. It is an intelligent agent that recognizes patterns in complicated and real-world contexts. Artificial neural networks, fuzzy logic, evaluation computation, and hybrid methods are other subcategories of computational intelligence. Each branch of computational intelligence was examined in [44] from the cybersecurity perspective, along with their benefits and drawbacks.

2.2. Machine and Deep Learning Methodologies

Study [37] aimed to identify stress in individuals using machine learning techniques to enhance their quality of life. The WESAD dataset, a publicly accessible multimodal dataset, was utilized to access different ML methodologies for identifying individual stress via ML methods such as k-NN, linear discriminant analysis, random forest, AdaBoost, and Support Vector Machine. The random forest algorithm performed more adequately than other algorithms to classify two and three categories, with values of 83.34 and 65.73 regarding the F1-score. In our comprehensive review, we focused on stress recognition using wearable detectors and appropriate machine learning approaches. This analysis looks at how stress can be detected using wearable detectors, photoplethysmography (PPG), electrocardiograms (ECG), electroencephalograms (EEG), and other sensing devices in a variety of situations, including driving, learning, and working [22].
We proposed an approach based on a convolutional neural network multi-level DNN with hierarchical learning abilities. A hierarchy of networks is trained to use multivariate time-series data from wrist-based and chest-based device bio-signals to create high-level features for each bio-signal feature. The high-level features are incorporated into one coherent presentation using a proposed model-level fusion technique, which divides the stress states into baseline, stress, and amusement categories. The WESAD dataset for cognitive health is employed to assess the methodology, which corresponds well with cutting-edge techniques and has an outstanding interpretation accurateness of 87.7% [38]. The author of this study designed a DNN strategy that comprises a multilayer perceptron (MLP) neural network and a one-dimensional CNN. Deep neural networks can extract features from raw data through the neural network’s layers without the need for manually created features. To complete two tasks, the deep neural networks examined physiological data obtained from wrist and chest sensors. Each neural network was developed to interpret wrist or chest sensor data. The networks’ first objective was to distinguish between stressed and non-stressed states in a binary classification for stress detection. The networks used a three-class classification scheme in the second experiment to distinguish between baseline, stressed, and amused conditions. The networks were prepared and evaluated using data from earlier studies made publicly available.
Regarding the classification accuracy for binary and three-class classification, the deep convolutional neural network achieved 99.80% and 99.55%, respectively. The deep MLP neural network attained 99.65% and 98.38% accuracy rates for binary and three-class classification, correspondingly [45]. The authors of [28] proposed a new wearable gadget that concurrently estimates electroencephalograms (EEG) and electrocardiograms (ECG) using a non-invasive method. This strategy combines an analog front end (AFE) with a digital back end (DBE) processor based on machine learning to predict mental stress utilizing just three electrodes. With the use of readily available commercial components, a PCB prototype was created. The created prototype has a classification accuracy of 92.7%, a reasonable noise performance of 0.1 Vrms, and can forecast mental stress. The suggested method is portable and straightforward to wear (behind the ear). For several stress scenarios, including the Stroop Color and Word Test and the Arithmetic Test, data were collected from 25 subjects. An external neural network (SNN) classifier categorized the stress states using various EEG- and ECG-based feature combinations.
The authors of [21] presented a thorough study on stress detection, beginning with an initial investigation including a population of frail older adults with mild cognitive impairment (MCI) who took part in mental and motor rehabilitation sessions, were fitted with wearable physiological sensors, and were given a smartphone application for physiological tracking. Data were gathered using replies received during therapy sessions to determine how physical activity favors cognitive training. Machine learning classifiers were used for the prediction of stress utilizing real-world data. In [46], the authors used a machine learning algorithm to diagnose depression, anxiety, and stress by gathering data using questionnaires from employed and unemployed people from different countries. Five distinct ML algorithms were used to predict the occurrence of anxiety, sadness, and stress on various severity levels. These algorithms are extremely accurate; thus, they are well suited to forecasting psychological issues. Classes were determined to be imbalanced in the confusion matrix after using various approaches. To help choose the random forest classifier as the highest accuracy model among the five applied algorithms, the F1-score metric was included. The authors of [47] suggested SELF-CARE, a wrist-based stress detection technique that uses context-aware selective sensor fusion and dynamic sensor data-driven adaptation. The proposed approach learns to change the fused sensors in the context of the system using motion, enhancing the performance while preserving energy. In the publicly accessible WESAD dataset, SELF-CARE offers a cutting-edge performance, with accuracy scores for the three-class and two-class classification problems of 86.34% and 94.12%, respectively.

3. Proposed Model

The steps of the proposed approach are described in this section. Machine learning algorithms are utilized for chest-feature-based stress prediction. The proposed methodology is assessed on the following evaluation metrics: precision, accuracy, recall, and F1-score. The research was validated on Anaconda using jupyter notebook and Python language. Figure 1 illustrates the steps of the proposed work individually. Firstly, we used the publicly available WEASD dataset and performed exploratory data analysis steps for data visualization and preprocessing to convert raw data into a helpful format. RESP was utilized to extract useful features, and after extracting them, we generated 28 data frames from 14 subjects. In the data preprocessing steps, first, we applied the Z-score to remove outliers from the dataset. Then, the feature selection step was carried out using the SelectKBest technique for selecting features. At last, SMOTE was applied for imbalanced datasets and normalization was applied to scale the feature values in a specified range. The first ML classifier (LR, LDA, and QDA) was individually applied to the preprocessed dataset. Then, a stacking technique based on RF, LR, LDA, and QDA was applied to improve the performance.

3.1. Dataset Preliminaries

This research utilized a dataset available on the public UCI machine learning repository, which was proposed in [48]. The Wearable Stress and Affect Detection (WESAD) dataset is widely used in stress detection. It consists of physiological signals, motion sensors, and self-reported labels collected from wearable devices worn by participants in controlled experiments. Our study specifically focuses on the chest-based features available in the WESAD dataset. These features include heart rate, respiration, and electrodermal activity. These physiological signals have been widely studied in the context of stress detection and have shown promise in accurately capturing stress-related responses in the body. The heart rate provides information about the cardiovascular stress response, while respiration patterns can indicate changes in the autonomic nervous system. The electrodermal activity, measured through skin conductance, reflects the electrical properties of the skin and is known to be sensitive to emotional arousal, including stress.
A RespiBAN professional chest-worn device was used for data collection. The RespiBAN has sensors for measuring ACC and RESP and can serve as an intersection for up to four other modalities. The four analog ports record the ECG, EDA, EMG, and TEMP. At 700 Hz, all signals are captured. The RespiBAN covers the subject’s chest. A respiratory inductive plethysmograph detector is employed to document the RESP. The usual three-point ECG is used to record the ECG data. The EDA signal is captured on the rectus abdominis, and the TEMP sensor is positioned on the sternum to permit the subject to move as much as possible. The upper trapezius muscle’s EMG data are logged on both sides of the spine. The collected data are kept locally and then moved to a computer for additional processing after the experimentation to prevent wireless packet loss. These were the steps performed in [48] to collect data. This research uses this dataset to detect stress using the RespiBAN chest sensor device data.
Since we have the raw data from the chest sensor, we created a feature to obtain valuable data. To this end, we used EDA, EMG, and TEMP columns from the chest sensor’s raw data. To divide the raw signals into one-minute windows for this feature generation procedure, we employed a sliding window with a window shift of 0.25 s (except for EMG data, which was processed with a 5 s window). We started with the TEMP data, representing temperature in degrees Celsius. We produced several fundamental characteristics for this column, such as the mean value, standard deviation, dynamic range, and slope for each window.
Next was the EMG data, which contained electromyography readings calculated in mV. As stated, a unique 5 s processing window was used for this feature. The mean value, standard deviation, and dynamic range for each window were generated, along with the same characteristics as the temperature column. The EDA data, or electrodermal activity as measured in S, were processed last. Using the raw data, we calculated each window’s mean value, standard deviation, dynamic range, and slope. We divided EDA into SCL and SCR, which we found after performing some investigations. The Skin Conductance Level (SCL) and Skin Conductance Responses (SCRs), caused by sympathetic neural activity, are vital components of the EDA complex. Hence, we generated mean and standard deviation features for SCL and SCR components. The number of peaks for each window is another intriguing feature we evaluated for the SCR component. Figure 2 illustrates the features extracted from the EDA raw data, and Figure 3 illustrates the SCR peak data detection. The additional column from the raw data is called ACC, which contains the accelerometer data utilized to characterize the movement. We created the following characteristics from this data using ACC data, such as Max|ACC|, 3D means, and 3D standard deviation for all axes. The absolute integral depicts movement on all axes and in three dimensions. This was generated within a window of 5 s. The window shift remained constant at 0.25 s. Electrocardiography data in the dataset are represented in the ECG column, measured in mV. To add behavioral heart features, we generated the following attributes: heart rate mean values, standard deviation, maximum and minimum values for every window, NN50 feature, RMSSD feature, average and standard deviation values of distance among peaks and energy in diverse frequency bands, and rate feature.
From a non-specialist in life sciences point of view, this feature describes different biological heart effects, so we accept this data as they are. Window parameters were standard. Here, to find distances between peaks, we used the find_peaks algorithm to find the peaks and used the FFT transform of diff(diff(peaks_places)) to generate feature energy in the different frequency bands. We smoothed the plot with the savior filter and used a lowpass filter.

3.2. RESP Features

Respiration (RESP) features were produced to understand the effect of stress on the breathing process of a patient. The features are mean and std inhalation (I) duration; max amplitude, mean, and std exhalation (E) duration; and max amplitude, E ratio, mean, and standard deviation values of analog of volume and respiration rate. To generate these, we used the standard window parameters described above. To determine the duration of breathing, we used:
  • The find_peaks mechanism. It gives very good results, but sometimes there were several non-detected peaks.
  • As a solution to this problem, we proposed an algorithm called find_duration, which finds the duration only in places where real respiration is detected without error.
  • After this algorithm usage, the amplitude can be easily determined.
  • As a volume analog, we used the absolute integral of RESP sensor values.

3.3. Data Collection

In this research, we focus on chest sensor data, generally the features extracted from chest sensor data with some adaptations made based on the raw data parameters such as the sampling frequency. After extracting the features, we generated 28 data frames from 14 subjects for the chest-based dataset.

3.4. Feature Analysis

Further, we created a feature analysis function that creates binary target values and builds density distribution functions. We used it to analyze features and understand which ones can be dropped before fitting. We analyzed data from one subject and had great results. We could separate stress states and calmness with an accuracy of about 100% for a particular subject. Moreover, after analysis (density plots), the below features cannot help separate these classes. Thus, we decided to drop them. We determined that there are too many data for fitting. Thus, we decided to make a large test dataset to make fitting faster.

3.4.1. Z-Score Method

The Z-score method is a commonly used statistical technique for identifying and removing outliers from a dataset. It is based on standard deviation and measures how far away every data attribute is from the mean regarding the standard deviation [49]. In our scenario, outliers were removed from the dataset if determined to be data entry errors or anomalies, and the outliers were replaced with missing values (NaN) to retain the dataset’s length and structure but exclude extreme values from the analysis. The outliers were replaced with more reasonable values based on domain knowledge or advanced imputation techniques if the outliers represented genuine data points.

3.4.2. Feature Selection Using SelectKBest Method

The feature selection strategy called the SelectKBest approach was used to pick the K-best features from a dataset using statistical criteria. It evaluates the association between every feature and the target variable and assigns a score to every feature. The feature is often considered for the target variable, resulting in a higher score [50]. In our scenario, we assume that DataFrame X contains the features and a numpy array or pandas Series y contains the target variable. The score_func parameter is set to f_classif, which is appropriate for classification tasks. After fitting the selector to the data, the transform method transforms the dataset X to include only the selected features. Then, we accessed the indices of the selected features using get_support(indices=True) and retrieved their names from the original feature set. The number of features chosen, i.e., 10, determines the value of k.

3.4.3. Synthetic Minority Over-Sampling Technique (SMOTE)

SMOTE is a popular technique used in machine learning to address class imbalance problems in classification tasks [51]. It is specifically made to deal with imbalanced datasets where the majority class has a disproportionately small number of instances compared to the minority class [52]. In our scenario, X represents the feature matrix and y represents the target variable. The fit_resample method performs SMOTE oversampling, and it returns the resampled feature matrix X_resampled and the corresponding target variable y_resampled.

3.4.4. Normalization

Normalization, or feature scaling, is a preprocessing approach utilized in ML to adjust different features or variables to a similar scale [53,54,55]. It is performed to ensure that no particular feature dominates the learning algorithm due to its larger magnitude or unit of measurement. Normalization typically involves transforming the values of numerical features to a standard scale, usually ranging between 0 and 1 or −1 and 1. There are several standard methods for normalization; in this research, we utilized Min-Max normalization or rescaling. This method scales the feature values to a specified range, often between 0 and 1. The formula for Min-Max scaling is illustrated in Equation  (1):
x n o r m a l i z e d = ( x m i n ( x ) ) ( m a x ( y ) m i n ( y ) )
By employing these techniques, we aim to preprocess the data, extract relevant features, handle class imbalance, and normalize the data for subsequent analysis and modeling. Each technique was chosen based on its suitability for stress detection, the previous literature on stress-related features, and best practices in data preprocessing and machine learning. These methods enhance our stress detection models’ accuracy, interpretability, and robustness. Then, we split the dataset into training validation and testing sets.

3.5. Machine Learning Classifiers

Three ML classifiers, such as LR, LDA, QDA, and one ensemble stacking model, are used to predict stress problems using chest-based sensor data.
Logistic Regression: Logistic regression is a statistical analytical method that utilizes prior dataset observations to forecast a binary output, such as yes or no. A logistic regression algorithm constructs predictions regarding a dependent data variable by examining the correlation among one or more independent variables that are already present [56].
Linear and Quadratic Discriminant Analysis: Linear discriminant analysis (LDA) is a technique for reducing dimensionality. It is a pre-processing phase in machine learning and feature classification applications [57]. LDA is employed when a linear border among algorithms is essential, and QDA is utilized to determine a non-linear boundary among algorithms. When the feedback categories are different, and the distribution of X = x for each class is typical, LDA and QDA perform similarly. Stacking: A stacking classifier is used to leverage the strengths of different models and improve the overall prediction performance. It can help confound the restrictions of separate models and deliver more authentic and strong predictions. Stacking is a flexible and powerful technique but it requires careful consideration of a model, feature engineering, and avoiding overfitting. It can be a practical approach for improving the classification performance when used appropriately [58]. In this experiment, we used a stacking classifier by combining the predictions of multiple base classifiers and another classifier, referred to as the final_estimator, to make the final prediction. The following base classifiers and final estimator are used:
  • Quadratic Discriminant Analysis (QDA): Quadratic discriminant analysis is a classification algorithm that assumes each class follows a quadratic distribution. It estimates class boundaries based on the quadratic discriminant function.
  • Linear Discriminant Analysis (LDA): Linear discriminant analysis is a classification algorithm that assumes each class follows a Gaussian distribution. It calculates the optimal linear discriminant functions to separate the classes.
  • Logistic Regression (LR): The classification procedure known as logistic regression uses the logistic function to model the connections among the input variables and their possibility of belonging to a certain class.
  • Random Forest: Random forest is an ensemble learning method for making predictions incorporating numerous decision trees. The final forecast is obtained by voting after each tree in the forest has been trained using a random portion of the training data.
The choice of the stacking model in our proposed approach is based on its potential to improve the overall performance and robustness of the stress detection system. The stacking model is an ensemble learning technique that combines multiple base models to make predictions. It aggregates the predictions from different models, effectively leveraging the strengths of each model. By combining the outputs of multiple models, the stacking model aims to capture diverse perspectives and improve the overall predictive power.
Algorithm 1 describes the method of predicting stress using the chest sensor dataset. The input is the dataset and the output is the model performance. The algorithm consists of several steps, such as data visualization ( D v ) to visualize the data to gain insights into their structure and relationships. Data preprocessing ( D p ) is performed to clean and transform the data to make them suitable for modeling. After that, the RESP feature ( R f ) step involves extracting features from the data related to respiratory behavior. Feature analysis ( F A ) is performed, in which the following steps are carried out: Z_Score Method, SelectKBest Method, SMOTE for balancing data, and standard scaler normalization. The dataset is split into training and testing sets. Four classifiers are trained on the training set: LR, LDA, QDA, and the stacking model. The classifiers are evaluated on the testing set using evaluation metrics. The algorithm returns the best results from the evaluation of the classifiers.
Algorithm 1 Algorithm for Stress Prediction.
1:
I n p u t : Chest Sensor Dataset C d s
2:
O u t p u t : Model Performance M p
3:
D v Data Visualization
4:
D p Data Preprocessing
5:
R f RESP Features
6:
D C Data Collection
7:
F A Features Analysis
8:
    Z _ s Z_Score Method
9:
    F _ s SelectKBest Method
10:
S SMOTE for balancing data
11:
 ← Min_Max Scalar
12:
x t r a i n , x t e s t , , y t r a i n , y t e s t {Train Test split}
13:
C l a s s i f i e r s M L
14:
LR ←Logistic Regression
15:
LDA ←Linear Discriminant Analysis
16:
QDA ←Quadratic Discriminant Analysis
17:
Stacking ←Stacking Ensemble Model
18:
E _ m Accuracy, Precision, Recall, F1_Score {Evaluation metrics}
19:
Return ← Best Results

4. Experimental Results and Discussion

This research validation uses the WESAD dataset accessible at the public UCI machine learning archive. This section explains the evaluation measurements used for the experiment result and model discussion. It also provides feature extraction, feature analysis, and feature selection techniques on the used dataset. It applies the stacking technique by combining three machine learning algorithms to improve the model’s performance.

4.1. Evaluation Metrics

The experiment evaluation is examined using accuracy (A), F1-score (F1), recall (R), and precision (P) measurements. These evaluation measurements estimate how sufficiently the proposed approach performs. The percentages of false positives (FP), true positives (TP), and false negatives (FN) are calculated to evaluate the proposed model’s precision. The accuracy estimate is represented in Equation (2). It measures the actual positives as a percentage of all positive data and is sometimes referred to as a value that is greatly anticipated. The precision rate is shown in Equation (3). Sensitivity, the probability of prediction, and the possibility of a true positive represent the ratio of real positives to TP and FN in a dataset. Equation (4) shows the recall rate. The F1-score is calculated as the weighted average of recall and precision. Equation (5) provides the F1-score.
A c c u r a c y = T P + T N T P + T N + F P + F N
P r e c i s i o n = T P T P + F P
R e c a l l = T P T N + F N
F 1 - s c o r e = 2 × P r e c i s i o n + R e c a l l P r e c i s i o n + R e c a l l
Table 1 illustrates the outcome of a proposed model, including all evaluation metrics for every model. The models evaluated are LR, LDA, QDA, and stacking. LR attained an accuracy of 0.978, a precision of 0.998, a recall of 0.975, and an F1-score of 0.986. LDA attained an accuracy of 0.955, a precision of 0.999, a recall of 0.945, and an F1-score of 0.971. QDA attained an accuracy of 0.978, a precision of 0.998, a recall of 0.975, and an F1-score of 0.986. Stacking attained an accuracy of 0.997, a precision of 0.999, a recall of 0.997, and an F1-score of 0.998. These results suggest that all models perform well, but their performances differ. LR, QDA, and stacking have similar scores, with a high accuracy, precision, recall, and F1-score. LDA has slightly lower scores, indicating a slight deviation from perfect predictions compared to the other models.
A confusion matrix (CM) defines how sufficiently a classification algorithm performs. A CM illustrates and aggregates a classification algorithm’s performance. Figure 4 shows the CM of the LR algorithm of the proposed model. It shows that if the TP and TN values are greater than the FP and FN values, the performance of the proposed model improves, and the model performs well on the used dataset. Figure 5 illustrates the proposed model’s recursive operating characteristics (ROC) graph. The model outperforms, with an area of the ROC curve of 0.997%.
Figure 6 shows the CM of the LDA algorithm of the proposed approach. It shows that if the TP and TN values are more significant than false positive FP and negative FN values, the interpretation of the proposed approach improves, and the model performs well on the used dataset. Figure 7 illustrates the proposed model’s ROC graph. The area of the ROC curve is 0.999%, which shows the model performed well.
Figure 8 shows the confusion matrix of the QDA algorithm of the proposed model. It shows that if the TP and TN values are more significant than the FP and FN values, the interpretation of the proposed approach improves, and the model performs well on the used dataset. Figure 9 illustrates the proposed model’s ROC graph. The area of the ROC curve is 0.997%, which shows the model performed well.
Figure 10 shows the confusion matrix of the stacking algorithm of the proposed model. It shows that if the TP and TN values are more significant than the FP and FN values, the interpretation of the proposed model improves, and the model performs well on the used dataset. Figure 11 illustrates the proposed model’s ROC graph. The area of the ROC curve is 0.998%, which shows the model performed well.
Table 2 compares the proposed approach with existing approaches in stress detection using physiological signals. We compared the A% and F1% of different models on the WESAD dataset. As cited in the table, three existing approaches have been evaluated and compared with the proposed approach. Study [28] achieved an accuracy of 92.7% using an SNN model. In study [59], the authors attained an accuracy of 85.7% using a random forest (RF) model. Another study [38] achieved an accuracy of 87.7% using a CNN model, and in [60], the authors attained an accuracy of 96.26% using an ANN model. In comparison, the proposed approach achieved an impressive accuracy of 99.7% and an F1-score of 99.8% using a stacking model. These results further demonstrate the superiority of the approach in accurately detecting stress using the WESAD dataset.
The suggested method employs a stacking model with an F1-score of 0.998 and an accuracy of 0.997 to identify stress. The outcomes demonstrate that the suggested strategy performs better than the current approaches regarding accuracy and F1 score.

4.2. Discussion

To evaluate the performance of our stress detection model and mitigate the risk of overfitting, we adopt a cross-validation approach. Specifically, we employ k-fold cross-validation, dividing the dataset into k subsets or folds. The model is trained on k − 1 folds and validated on the remaining folds. This process is repeated k times, ensuring each fold serves as the training and validation set. The performance metrics, including accuracy, precision, recall, and F1-score, were calculated by averaging the results across all folds. By employing cross-validation, we can assess the model’s performance on multiple independent subsets of the data, reducing the likelihood of overfitting and providing a more robust estimation of its effectiveness.
To demonstrate the superiority of our method, we focused on the following aspects:
  • Accuracy and performance: we compared our stress detection model’s accuracy, precision, recall, and F1-score with those reported in previous studies.
  • Generalizability: We analyzed the generalizability of our model by considering the diversity and size of the dataset used compared to previous studies. A more extensive and diverse dataset can lead to improved generalization capabilities, enabling our model to perform well on unseen data.
  • Efficiency: We assessed our method’s computational efficiency and resource requirements compared to traditional or previous AI-based approaches. This analysis demonstrated the practicality and scalability of our proposed method in real-world healthcare settings.
By conducting a thorough comparative analysis, we aim to highlight the strengths and advantages of our proposed method over traditional and previous studies. This will reinforce the significance and novelty of our approach to stress detection and contribute to the existing body of knowledge in the field.

5. Conclusions

In this research, we proposed chest-feature-based stress prediction on the WESAD dataset. The proposed model accurately determined stress using chest features from the provided data because of two reasons: we dropped fewer critical features and applied feature analysis, which included Z-score, feature selection, SMOTE, and normalization. The stacking model performs well with all machine learning classifiers, and the highest performance achieved regarding accuracy is 0.997%. The results for the chest set are better than for the wrist one. However, wrist sensors can be more easily integrated into real-life scenarios. We conclude that the proposed model can be applicable in everyday life and very useful in detecting stress states. Using this approach, we concluded that ML models could effectively define humans’ psychological and physiological states using data obtained from physio sensors. Our model correctly generated features from raw data, and after correctly selecting features, a suitable ML model can give a fairly good result. A disease is easier to treat the earlier it is identified. Medical professionals can detect stress more quickly and accurately with the help of the proposed method, which can spot these changes in people prematurely. However, it is essential to note that the proposed approach has only been assessed on the WESAD dataset and may not generalize to other datasets. Thus, the proposed approach will be evaluated on different datasets to determine the model’s generalizability, and a deep learning algorithm will be applied to the WEASD dataset.

Author Contributions

Conceptualization, A.A. and S.A.; formal analysis, A.A., G.A.S. and M.A.; funding acquisition, A.A.; investigation, M.A.; methodology, A.A. and S.A.; validation, A.A. and S.A.; visualization, G.A.S.; writing—original draft, A.A., G.A.S., M.A. and S.A.; writing—review and editing, A.A., G.A.S., M.A. and S.A. All authors have read and agreed to the published version of the manuscript.

Funding

The authors extend their appreciation to the Deputyship for Research and Innovation, Ministry of Education in Saudi Arabia, for funding this research work through project number 223202.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Acknowledgments

The authors extend their appreciation to the Deputyship for Research and Innovation, Ministry of Education in Saudi Arabia, for funding this research work through project number 223202.

Conflicts of Interest

The authors share no conflict of interest.

References

  1. Almadhor, A.; Sampedro, G.A.; Abisado, M.; Abbas, S.; Kim, Y.J.; Khan, M.A.; Baili, J.; Cha, J.H. Wrist-Based Electrodermal Activity Monitoring for Stress Detection Using Federated Learning. Sensors 2023, 23, 3984. [Google Scholar] [CrossRef]
  2. Ghazal, T.M.; Hasan, M.K.; Alshurideh, M.T.; Alzoubi, H.M.; Ahmad, M.; Akbar, S.S.; Al Kurdi, B.; Akour, I.A. IoT for smart cities: Machine learning approaches in smart healthcare—A review. Future Internet 2021, 13, 218. [Google Scholar] [CrossRef]
  3. Sabry, F.; Eltaras, T.; Labda, W.; Alzoubi, K.; Malluhi, Q. Machine learning for healthcare wearable devices: The big picture. J. Healthc. Eng. 2022, 2022, 4653923. [Google Scholar] [CrossRef] [PubMed]
  4. Saleem, K.; Saleem, M.; Ahmad, R.Z.; Javed, A.R.; Alazab, M.; Gadekallu, T.R.; Suleman, A. Situation-aware BDI reasoning to detect early symptoms of COVID-19 using smartwatch. IEEE Sens. J. 2022, 23, 898–905. [Google Scholar] [CrossRef] [PubMed]
  5. Alqahtani, A.; Alsubai, S.; Sha, M.; Peter, V.; Almadhor, A.S.; Abbas, S. Falling and drowning detection framework using smartphone sensors. Comput. Intell. Neurosci. 2022, 2022, 6468870. [Google Scholar] [CrossRef] [PubMed]
  6. Javed, A.R.; Sarwar, M.U.; Beg, M.O.; Asim, M.; Baker, T.; Tawfik, H. A collaborative healthcare framework for shared healthcare plan with ambient intelligence. Hum.-Centric Comput. Inf. Sci. 2020, 10, 40. [Google Scholar] [CrossRef]
  7. Javed, A.R.; Sarwar, M.U.; ur Rehman, S.; Khan, H.U.; Al-Otaibi, Y.D.; Alnumay, W.S. Pp-spa: Privacy preserved smartphone-based personal assistant to improve routine life functioning of cognitive impaired individuals. Neural Process. Lett. 2023, 55, 35–52. [Google Scholar] [CrossRef]
  8. Mukhtar, H.; Rubaiee, S.; Krichen, M.; Alroobaea, R. An IoT framework for screening of COVID-19 using real-time data from wearable sensors. Int. J. Environ. Res. Public Health 2021, 18, 4022. [Google Scholar] [CrossRef]
  9. Javed, A.R.; Fahad, L.G.; Farhan, A.A.; Abbas, S.; Srivastava, G.; Parizi, R.M.; Khan, M.S. Automated cognitive health assessment in smart homes using machine learning. Sustain. Cities Soc. 2021, 65, 102572. [Google Scholar] [CrossRef]
  10. Usman Sarwar, M.; Rehman Javed, A.; Kulsoom, F.; Khan, S.; Tariq, U.; Kashif Bashir, A. Parciv: Recognizing physical activities having complex interclass variations using semantic data of smartphone. Softw. Pract. Exp. 2021, 51, 532–549. [Google Scholar] [CrossRef]
  11. Shtwai, A.; Abdullah, A.; Mohemmed, S.; Sidra, A.; Michal, G.; Robert, F. Automated Cognitive Health Assessment Based on Daily Life Functional Activities. Comput. Intell. Neurosci. 2023, 2023, 5684914. [Google Scholar]
  12. Zeng, Q.; Bie, B.; Guo, Q.; Yuan, Y.; Han, Q.; Han, X.; Chen, M.; Zhang, X.; Yang, Y.; Liu, M.; et al. Hyperpolarized Xe NMR signal advancement by metal-organic framework entrapment in aqueous solution. Proc. Natl. Acad. Sci. USA 2020, 117, 17558–17563. [Google Scholar] [CrossRef]
  13. Lu, S.; Yang, J.; Yang, B.; Yin, Z.; Liu, M.; Yin, L.; Zheng, W. Analysis and Design of Surgical Instrument Localization Algorithm. CMES-Comput. Model. Eng. Sci. 2023, 137, 669–685. [Google Scholar] [CrossRef]
  14. Hassan, R.; Qamar, F.; Hasan, M.K.; Aman, A.H.M.; Ahmed, A.S. Internet of Things and its applications: A comprehensive survey. Symmetry 2020, 12, 1674. [Google Scholar] [CrossRef]
  15. Siddiqui, S.Y.; Haider, A.; Ghazal, T.M.; Khan, M.A.; Naseer, I.; Abbas, S.; Rahman, M.; Khan, J.A.; Ahmad, M.; Hasan, M.K.; et al. IoMT cloud-based intelligent prediction of breast cancer stages empowered with deep learning. IEEE Access 2021, 9, 146478–146491. [Google Scholar] [CrossRef]
  16. Safa, M.; Pandian, A.; Gururaj, H.; Ravi, V.; Krichen, M. Real time health care big data analytics model for improved QoS in cardiac disease prediction with IoT devices. Health Technol. 2023, 13, 473–483. [Google Scholar] [CrossRef]
  17. Abbas, A.; Alroobaea, R.; Krichen, M.; Rubaiee, S.; Vimal, S.; Almansour, F.M. Blockchain-assisted secured data management framework for health information analysis based on Internet of Medical Things. Pers. Ubiquitous Comput. 2021, 1–14. [Google Scholar] [CrossRef]
  18. Lu, S.; Yang, B.; Xiao, Y.; Liu, S.; Liu, M.; Yin, L.; Zheng, W. Iterative reconstruction of low-dose CT based on differential sparse. Biomed. Signal Process. Control. 2023, 79, 104204. [Google Scholar] [CrossRef]
  19. Hayano, J.; Yamamoto, H.; Nonaka, I.; Komazawa, M.; Itao, K.; Ueda, N.; Tanaka, H.; Yuda, E. Quantitative detection of sleep apnea with wearable watch device. PLoS ONE 2020, 15, e0237279. [Google Scholar] [CrossRef] [PubMed]
  20. Alsubai, S.; Alqahtani, A.; Sha, M.; Abbas, S.; Almadhor, A.; Peter, V.; Mughal, H. Smart home-based complex interwoven activities for cognitive health assessment. J. Sens. 2022, 2022, 3792394. [Google Scholar] [CrossRef]
  21. Delmastro, F.; Di Martino, F.; Dolciotti, C. Cognitive training and stress detection in mci frail older people through wearable sensors and machine learning. IEEE Access 2020, 8, 65573–65590. [Google Scholar] [CrossRef]
  22. Gedam, S.; Paul, S. A review on mental stress detection using wearable sensors and machine learning techniques. IEEE Access 2021, 9, 84045–84066. [Google Scholar] [CrossRef]
  23. Shokouhmand, A.; Yang, C.; Aranoff, N.D.; Driggin, E.; Green, P.; Tavassolian, N. Mean pressure gradient prediction based on chest angular movements and heart rate variability parameters. In Proceedings of the 2021 43rd Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC), Virtual Conference, 1–5 November 2021; pp. 7170–7173. [Google Scholar]
  24. Javed, A.R.; Ahmed, W.; Pandya, S.; Maddikunta, P.K.R.; Alazab, M.; Gadekallu, T.R. A survey of explainable artificial intelligence for smart cities. Electronics 2023, 12, 1020. [Google Scholar] [CrossRef]
  25. Javed, A.R.; Shahzad, F.; ur Rehman, S.; Zikria, Y.B.; Razzak, I.; Jalil, Z.; Xu, G. Future smart cities: Requirements, emerging technologies, applications, challenges, and future aspects. Cities 2022, 129, 103794. [Google Scholar] [CrossRef]
  26. Javed, A.R.; Saadia, A.; Mughal, H.; Gadekallu, T.R.; Rizwan, M.; Maddikunta, P.K.R.; Mahmud, M.; Liyanage, M.; Hussain, A. Artificial Intelligence for Cognitive Health Assessment: State-of-the-Art, Open Challenges and Future Directions. Cogn. Comput. 2023, 1–46. [Google Scholar] [CrossRef]
  27. Dang, W.; Xiang, L.; Liu, S.; Yang, B.; Liu, M.; Yin, Z.; Yin, L.; Zheng, W. A Feature Matching Method based on the Convolutional Neural Network. J. Imaging Sci. Technol. 2023, 1–11. [Google Scholar] [CrossRef]
  28. Sheeraz, M.; Aslam, A.R.; Altaf, M.A.B. Multiphysiological Shallow Neural Network-Based Mental Stress Detection System for Wearable Environment. In Proceedings of the 2022 IEEE International Symposium on Circuits and Systems (ISCAS), Austin, TX, USA, 27 May–1 June 2022; pp. 2309–2313. [Google Scholar]
  29. Statistics—Work-Related Ill Health and Occupational Disease. Available online: https://www.hse.gov.uk/statistics/causdis/ (accessed on 28 March 2023).
  30. Arza, A.; Garzón-Rey, J.M.; Lázaro, J.; Gil, E.; Lopez-Anton, R.; de la Camara, C.; Laguna, P.; Bailon, R.; Aguiló, J. Measuring acute stress response through physiological signals: Towards a quantitative assessment of stress. Med. Biol. Eng. Comput. 2019, 57, 271–287. [Google Scholar]
  31. Reis, R.S.; Hino, A.; Añez, C. Perceived stress scale. J. Health Psychol. 2010, 15, 107–114. [Google Scholar] [CrossRef] [Green Version]
  32. Mozos, O.M.; Sandulescu, V.; Andrews, S.; Ellis, D.; Bellotto, N.; Dobrescu, R.; Ferrandez, J.M. Stress detection using wearable physiological and sociometric sensors. Int. J. Neural Syst. 2017, 27, 1650041. [Google Scholar]
  33. Javed, A.R.; Sarwar, M.U.; Khan, S.; Iwendi, C.; Mittal, M.; Kumar, N. Analyzing the effectiveness and contribution of each axis of tri-axial accelerometer sensor for accurate activity recognition. Sensors 2020, 20, 2216. [Google Scholar] [CrossRef] [Green Version]
  34. Zhou, L.; Liu, Y.; Sun, H.; Li, H.; Zhang, Z.; Hao, P. Usefulness of enzyme-free and enzyme-resistant detection of complement component 5 to evaluate acute myocardial infarction. Sensors Actuators B Chem. 2022, 369, 132315. [Google Scholar] [CrossRef]
  35. Ullah, F.; Chen, X.; Rajab, K.; Reshan, A.; Saleh, M.; Shaikh, A.; Hassan, M.A.; Rizwan, M.; Davidekova, M. An efficient machine learning model based on improved features selections for early and accurate heart disease predication. Comput. Intell. Neurosci. 2022, 2022, 1906466. [Google Scholar] [CrossRef]
  36. Salai, M.; Vassányi, I.; Kósa, I. Stress detection using low cost heart rate sensors. J. Healthc. Eng. 2016, 2016, 5136705. [Google Scholar] [CrossRef] [PubMed]
  37. Garg, P.; Santhosh, J.; Dengel, A.; Ishimaru, S. Stress detection by machine learning and wearable sensors. In Proceedings of the 26th International Conference on Intelligent User Interfaces-Companion, College Station, TX, USA, 14–17 April 2021; pp. 43–45. [Google Scholar]
  38. Kumar, A.; Sharma, K.; Sharma, A. Hierarchical deep neural network for mental stress state detection using IoT based biomarkers. Pattern Recognit. Lett. 2021, 145, 81–87. [Google Scholar] [CrossRef]
  39. Chen, J.; Abbod, M.; Shieh, J.S. Pain and stress detection using wearable sensors and devices—A review. Sensors 2021, 21, 1030. [Google Scholar] [CrossRef]
  40. Karthick, T.; Sangeetha, M.; Ramprasath, M.; Ananthajothi, K. Continuous Activity-Aware Stress Detection Using Sensors. Wirel. Pers. Commun. 2022, 127, 17. [Google Scholar] [CrossRef]
  41. Wang, W.; Chen, Q.; Yin, Z.; Srivastava, G.; Gadekallu, T.R.; Alsolami, F.; Su, C. Blockchain and PUF-based lightweight authentication protocol for wireless medical sensor networks. IEEE Internet Things J. 2021, 9, 8883–8891. [Google Scholar] [CrossRef]
  42. Sarkar, J.L.; Ramasamy, V.; Majumder, A.; Pati, B.; Panigrahi, C.R.; Wang, W.; Qureshi, N.M.F.; Su, C.; Dev, K. I-Health: SDN-based fog architecture for IIoT applications in healthcare. IEEE/ACM Trans. Comput. Biol. Bioinform. 2022. ahead of print. [Google Scholar] [CrossRef]
  43. Pandya, S.; Gadekallu, T.R.; Reddy, P.K.; Wang, W.; Alazab, M. InfusedHeart: A novel knowledge-infused learning framework for diagnosis of cardiovascular events. IEEE Trans. Comput. Soc. Syst. 2022, 1–10, early access. [Google Scholar] [CrossRef]
  44. Hassan, M.A.; Ali, S.; Imad, M.; Bibi, S. New advancements in cybersecurity: A comprehensive survey. Big Data Anal. Comput. Intell. Cybersecur. 2022, 111, 3–17. [Google Scholar]
  45. Li, R.; Liu, Z. Stress detection using deep neural networks. BMC Med. Inform. Decis. Mak. 2020, 20, 285. [Google Scholar] [CrossRef] [PubMed]
  46. Priya, A.; Garg, S.; Tigga, N.P. Predicting anxiety, depression and stress in modern life using machine learning algorithms. Procedia Comput. Sci. 2020, 167, 1258–1267. [Google Scholar] [CrossRef]
  47. Rashid, N.; Mortlock, T.; Al Faruque, M.A. Self-care: Selective fusion with context-aware low-power edge computing for stress detection. In Proceedings of the 2022 18th International Conference on Distributed Computing in Sensor Systems (DCOSS), Los Angeles, CA, USA, 30 May–1 June 2022; pp. 49–52. [Google Scholar]
  48. Schmidt, P.; Reiss, A.; Duerichen, R.; Marberger, C.; Van Laerhoven, K. Introducing wesad, a multimodal dataset for wearable stress and affect detection. In Proceedings of the 20th ACM International Conference on Multimodal Interaction, Bouder, CO, USA, 16–20 October 2018; pp. 400–408. [Google Scholar]
  49. Aggarwal, V.; Gupta, V.; Singh, P.; Sharma, K.; Sharma, N. Detection of spatial outlier by using improved Z-score test. In Proceedings of the 2019 3rd International Conference on Trends in Electronics and Informatics (ICOEI), Tirunelveli, India, 23–25 April 2019; pp. 788–790. [Google Scholar]
  50. Brownlee, J. How to choose a feature selection method for machine learning. Mach. Learn. Mastery 2019, 10. [Google Scholar]
  51. Chawla, N.V.; Bowyer, K.W.; Hall, L.O.; Kegelmeyer, W.P. SMOTE: Synthetic minority over-sampling technique. J. Artif. Intell. Res. 2002, 16, 321–357. [Google Scholar] [CrossRef]
  52. Dablain, D.; Krawczyk, B.; Chawla, N.V. DeepSMOTE: Fusing deep learning and SMOTE for imbalanced data. IEEE Trans. Neural Netw. Learn. Syst. 2022, 1–15, early access. [Google Scholar] [CrossRef]
  53. Al Duhayyim, M.; Abbas, S.; Al Hejaili, A.; Kryvinska, N.; Almadhor, A.; Mohammad, U.G. An Ensemble Machine Learning Technique for Stroke Prognosis. Comput. Syst. Sci. Eng. 2023, 47, 413–429. [Google Scholar] [CrossRef]
  54. Alsubai, S.; Khan, H.U.; Alqahtani, A.; Sha, M.; Abbas, S.; Mohammad, U.G. Ensemble deep learning for brain tumor detection. Front. Comput. Neurosci. 2022, 16, 1005617. [Google Scholar] [CrossRef]
  55. Mehmood, M.; Rizwan, M.; Gregus ml, M.; Abbas, S. Machine learning assisted cervical cancer detection. Front. Public Health 2021, 9, 788376. [Google Scholar] [CrossRef] [PubMed]
  56. Connelly, L. Logistic regression. Medsurg. Nurs. 2020, 29, 353–354. [Google Scholar]
  57. Hayes, T.L.; Kanan, C. Lifelong machine learning with deep streaming linear discriminant analysis. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, Seattle, WA, USA, 14–19 June 2020; pp. 220–221. [Google Scholar]
  58. Alexandropoulos, S.A.N.; Aridas, C.K.; Kotsiantis, S.B.; Vrahatis, M.N. Stacking strong ensembles of classifiers. In Artificial Intelligence Applications and Innovations, Proceedings of the 15th IFIP WG 12.5 International Conference, AIAI 2019, Hersonissos, Crete, Greece, 24–26 May 2019, Proceedings 15; Springer: Cham, Switzerland, 2019; pp. 545–556. [Google Scholar]
  59. Zhu, L.; Ng, P.C.; Yu, Y.; Wang, Y.; Spachos, P.; Hatzinakos, D.; Plataniotis, K.N. Feasibility study of stress detection with machine learning through eda from wearable devices. In Proceedings of the ICC 2022-IEEE International Conference on Communications, Seoul, Republic of Korea, 16–20 May 2022; pp. 4800–4805. [Google Scholar]
  60. Eren, E.; Navruz, T.S. Stress Detection with Deep Learning Using BVP and EDA Signals. In Proceedings of the 2022 International Congress on Human–Computer Interaction, Optimization and Robotic Applications (HORA), Ankara, Turkey, 9–11 June 2022; pp. 1–7. [Google Scholar]
Figure 1. Proposed framework overview for stress detection.
Figure 1. Proposed framework overview for stress detection.
Sensors 23 06664 g001
Figure 2. Extracting SCR and SCL from EDA raw data.
Figure 2. Extracting SCR and SCL from EDA raw data.
Sensors 23 06664 g002
Figure 3. SCR data peak detection.
Figure 3. SCR data peak detection.
Sensors 23 06664 g003
Figure 4. Confusion matrix of logistic regression.
Figure 4. Confusion matrix of logistic regression.
Sensors 23 06664 g004
Figure 5. ROC curve of logistic regression.
Figure 5. ROC curve of logistic regression.
Sensors 23 06664 g005
Figure 6. Confusion matrix of LDA.
Figure 6. Confusion matrix of LDA.
Sensors 23 06664 g006
Figure 7. ROC curve of LDA.
Figure 7. ROC curve of LDA.
Sensors 23 06664 g007
Figure 8. Confusion matrix of QDA.
Figure 8. Confusion matrix of QDA.
Sensors 23 06664 g008
Figure 9. ROC curve of QDA.
Figure 9. ROC curve of QDA.
Sensors 23 06664 g009
Figure 10. Confusion matrix of stacking.
Figure 10. Confusion matrix of stacking.
Sensors 23 06664 g010
Figure 11. ROC curve of stacking.
Figure 11. ROC curve of stacking.
Sensors 23 06664 g011
Table 1. Proposed model result: accuracy—A; precision—P; recall—R; F1-score—F1.
Table 1. Proposed model result: accuracy—A; precision—P; recall—R; F1-score—F1.
ModelA%P%R%F1%
LR0.9780.9980.9750.986
LDA0.9550.9990.9450.971
QDA0.9780.9980.9750.986
Stacking Model0.9970.9990.9970.998
Table 2. Comparative analysis of the proposed approach with existing approaches.
Table 2. Comparative analysis of the proposed approach with existing approaches.
RefDatasetModelAccuracyF1-Score
[28]WESADSNN92.7-
[59]WESADRF85.7-
[38]WESADCNN87.7-
[60]WESADANN96.26-
Proposed approachWESADStacking model99.799.8
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Almadhor, A.; Sampedro, G.A.; Abisado, M.; Abbas, S. Efficient Feature-Selection-Based Stacking Model for Stress Detection Based on Chest Electrodermal Activity. Sensors 2023, 23, 6664. https://doi.org/10.3390/s23156664

AMA Style

Almadhor A, Sampedro GA, Abisado M, Abbas S. Efficient Feature-Selection-Based Stacking Model for Stress Detection Based on Chest Electrodermal Activity. Sensors. 2023; 23(15):6664. https://doi.org/10.3390/s23156664

Chicago/Turabian Style

Almadhor, Ahmad, Gabriel Avelino Sampedro, Mideth Abisado, and Sidra Abbas. 2023. "Efficient Feature-Selection-Based Stacking Model for Stress Detection Based on Chest Electrodermal Activity" Sensors 23, no. 15: 6664. https://doi.org/10.3390/s23156664

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop