Global Stress Detection Framework Combining a Reduced Set of HRV Features and Random Forest Model
Abstract
:1. Introduction
2. Methods
2.1. SWELL and WESAD Datasets
2.2. Proposed Global Stress Model
2.3. Feature Selection
2.4. Random Forest Algorithm
2.5. Evaluation Metrics
3. Results
4. Discussion and Conclusions
Supplementary Materials
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Stress. Available online: https://www.who.int/news-room/questions-and-answers/item/stress (accessed on 27 April 2023).
- Sinha, R. Chronic Stress, Drug Use, and Vulnerability to Addiction. Ann. N. Y. Acad. Sci. 2008, 1141, 105–130. [Google Scholar] [CrossRef]
- Daily Life—The American Institute of Stress. Available online: https://www.stress.org/daily-life (accessed on 27 April 2023).
- Li, R.; Liu, Z. Stress detection using deep neural networks. BMC Med. Inf. Decis. Mak. 2020, 20, 285. [Google Scholar] [CrossRef] [PubMed]
- Ghosh, S.; Kim, S.K.; Ijaz, M.F.; Singh, P.K.; Mahmud, M. Classification of Mental Stress from Wearable Physiological Sensors Using Image-Encoding-Based Deep Neural Network. Biosensors 2022, 12, 1153. [Google Scholar] [CrossRef] [PubMed]
- Gopalakrishna Pillai, R. Detection of Strength and Causal Agents of Stress and Relaxation for Tweets. In Proceedings of the Web Conference 2018—Companion of the World Wide Web Conference, WWW 2018, Lyon, France, 23–27 April 2018; pp. 1677–1684. [Google Scholar]
- Smets, E.; Casale, P.; Groβekathofer, U.; Lamichhane, B.; De Raedt, W.; Bogaerts, K.; Van Diest, I.; Van Hoog, C. Comparison of Machine Learning Techniques for Psychophysiological Stress Detection. Pervasive Comput. Paradig. Ment. Health 2015, 604, 13–22. [Google Scholar]
- Castaldo, R.; Melillo, P.; Bracale, U.; Caserta, M.; Triassi, M.; Pecchia, L. Acute mental stress assessment via short term HRV analysis in healthy adults: A systematic review with meta-analysis. Biomed. Signal. Process. Control 2015, 18, 370–377. [Google Scholar] [CrossRef]
- Munla, N.; Khalil, M.; Shahin, A.; Mourad, A. Driver stress level detection using HRV analysis. In Proceedings of the 2015 International Conference on Advances in Biomedical Engineering (ICABME), Beirut, Lebanon, 16–18 September 2015; pp. 61–64. [Google Scholar]
- Said Can, Y.; Chalabianloo, N.; Ekiz, D.; Fernandez-Alvarez, J.; Riva, G.; Ersoy, C. Personal Stress-Level Clustering and Decision-Level Smoothing to Enhance the Performance of Ambulatory Stress Detection with Smartwatches. IEEE Access 2016, 4, 38146–38163. [Google Scholar]
- Gjoreski, M.; Luštrek, M.; Gams, M.; Gjoreski, H. Monitoring stress with a wrist device using context. J. Biomed. Inf. 2017, 73, 159–170. [Google Scholar] [CrossRef] [PubMed]
- Sriramprakash, S.; Prasanna, V.D.; Murthy, O.V.R. Stress Detection in Working People. Procedia Comput. Sci. 2017, 115, 359–366. [Google Scholar] [CrossRef]
- Koldijk, S.; Neerincx, M.A.; Kraaij, W. Detecting Work Stress in Offices by Combining Unobtrusive Sensors; Detecting WorkStress in Offices by Combining Unobtrusive Sensors. IEEE Trans. Affect. Comput. 2018, 9, 227–239. [Google Scholar] [CrossRef]
- Rosales, M.A.; Bandala, A.A.; Vicerra, R.R.; Dadios, E.P. Physiological-Based Smart Stress Detector using Machine Learning Algorithms. In Proceedings of the 2019 IEEE 11th International Conference on Humanoid, Nanotechnology, Information Technology, Communication and Control, Environment, and Management (HNICEM), Laoag, Philippines, 29 November–1 December 2019; pp. 1–6. [Google Scholar]
- Can, Y.S.; Chalabianloo, N.; Ekiz, D.; Ersoy, C. Continuous Stress Detection Using Wearable Sensors in Real Life: Algorithmic Programming Contest Case Study. Sensors 2019, 19, 1849. [Google Scholar] [CrossRef]
- Nkurikiyeyezu, K.; Shoji, K.; Yokokubo, A.; Lopez, G. Thermal comfort and stress recognition in office environment. In Proceedings of the HEALTHINF 2019—12th International Conference on Health Informatics, Prague, Czech Republic, 22–24 February 2019; pp. 256–263. [Google Scholar]
- 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]
- Giannakakis, G.; Marias, K.; Tsiknakis, M. A stress recognition system using HRV parameters and machine learning techniques. In Proceedings of the 2019 8th International Conference on Affective Computing and Intelligent Interaction Workshops and Demos (ACIIW), Cambridge, UK, 3–6 September 2019; pp. 269–272. [Google Scholar]
- Golgouneh, A.; Tarvirdizadeh, B. Fabrication of a portable device for stress monitoring using wearable sensors and soft computing algorithms. Neural Comput. Appl. 2020, 32, 7515–7537. [Google Scholar] [CrossRef]
- Albertetti, F.; Simalastar, A.; Rizzotti-Kaddouri, A. Stress Detection with Deep Learning Approaches Using Physiological Signals. In HealthyIoT 2020, IoT Technologies for HealthCare; Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering; Goleva, R., Garcia, N.R.d.C., Pires, I.M., Eds.; Springer: Berlin/Heidelberg, Germany, 2021; Volume 360, pp. 95–111. [Google Scholar]
- Di Martino, F.; Delmastro, F. High-Resolution Physiological Stress Prediction Models based on Ensemble Learning and Recurrent Neural Networks. In Proceedings of the 2020 IEEE Symposium on Computers and Communications (ISCC), Rennes, France, 7–10 July 2020; pp. 1–6. [Google Scholar]
- Nkurikiyeyezu, K.; Yokokubo, A.; Lopez, G. The Effect of Person-Specific Biometrics in Improving Generic Stress Predictive Models. Sens. Mater. 2020, 32, 703–722. [Google Scholar] [CrossRef]
- 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]
- 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]
- Vargas-Lopez, O.; Perez-Ramirez, C.A.; Valtierra-Rodriguez, M.; Yanez-Borjas, J.J.; Amezquita-Sanchez, J.P. An Explainable Machine Learning Approach Based on Statistical Indexes and SVM for Stress Detection in Automobile Drivers Using Electromyographic Signals. Sensors 2021, 21, 3155. [Google Scholar] [CrossRef] [PubMed]
- Dalmeida, K.M.; Masala, G.L. HRV Features as Viable Physiological Markers for Stress Detection Using Wearable Devices. Sensors 2021, 21, 2873. [Google Scholar] [CrossRef] [PubMed]
- Szakonyi, B.; Vassányi, I.; Schumacher, E.; Kósa, I. Efficient methods for acute stress detection using heart rate variability data from Ambient Assisted Living sensors. Biomed. Eng. Online 2021, 20, 73. [Google Scholar] [CrossRef]
- Kang, M.; Shin, S.; Jung, J.; Kim, Y.T. Classification of Mental Stress Using CNN-LSTM Algorithms with Electrocardiogram Signals. J. Healthc. Eng. 2021, 2021, 9951905. [Google Scholar] [CrossRef]
- Fauzi, M.A.; Yang, B.; Blobel, B. Comparative Analysis between Individual, Centralized, and Federated Learning for Smartwatch Based Stress Detection. J. Pers. Med. 2022, 12, 1584. [Google Scholar] [CrossRef]
- Benchekroun, M.; Velmovitsky, P.E.; Istrate, D.; Zalc, V.; Morita, P.P.; Lenne, D. Cross Dataset Analysis for Generalizability of HRV-Based Stress Detection Models. Sensors 2023, 23, 1807. [Google Scholar] [CrossRef]
- Tarvainen, M.P.; Niskanen, J.P.; Lipponen, J.A.; Rantaaho, P.O.; Karjalainen, P.A. Kubios HRV—Heart rate variability analysis software. Comput. Methods Programs Biomed. 2014, 113, 210–220. [Google Scholar] [CrossRef]
- HRV Analysis Methods—Kubios. Available online: https://www.kubios.com/hrv-analysis-methods/ (accessed on 27 April 2023).
- Radovic, M.; Ghalwash, M.; Filipovic, N.; Obradovic, Z. Minimum redundancy maximum relevance feature selection approach for temporal gene expression data. BMC Bioinform. 2017, 18, 9. [Google Scholar] [CrossRef]
- 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 2018, Boulder, CO, USA, 16–20 October 2018; pp. 400–408. [Google Scholar]
- Kirschbaum, C.; Pirke, K.M.; Hellhammer, D.H. The ‘Trier social stress test’—A tool for investigating psychobiological stress responses in a laboratory setting. Neuropsychobiology 1993, 28, 76–81. [Google Scholar] [CrossRef]
- SWELL Dataset|Kaggle. Available online: https://www.kaggle.com/datasets/qiriro/swell-heart-rate-variability-hrv (accessed on 27 April 2023).
- Malik, M.; Bigger, J.T.; Camm, A.J.; Kleiger, R.E.; Malliani, A.; Moss, A.J.; Schwartz, P.J. Heart rate variability: Standards of measurement, physiological interpretation, and clinical use. Eur. Heart J. 1996, 17, 354–381. [Google Scholar] [CrossRef]
- Biometrics for Stress Monitoring|Kaggle. Available online: https://www.kaggle.com/datasets/qiriro/stress (accessed on 27 April 2023).
- Rekkas, V.P.; Sotiroudis, S.; Sarigiannidis, P.; Wan, S.; Karagiannidis, G.K.; Goudos, S.K. Machine learning in beyond 5 g/6 g networks—State-of-the-art and future trends. Electronics 2021, 10, 2786. [Google Scholar] [CrossRef]
- Prusty, S.; Patnaik, S.; Dash, S.K. SKCV: Stratified K-fold cross-validation on ML classifiers for predicting cervical cancer. Front. Nanotechnol. 2022, 4, 56. [Google Scholar] [CrossRef]
- Multiple-k: Picking the Number of Folds for Cross-Validation. Available online: https://cran.r-project.org/web/packages/cvms/vignettes/picking_the_number_of_folds_for_cross-validation.html (accessed on 6 March 2023).
- Available online: https://github.com/OIRL/2023StressModelHRV (accessed on 6 March 2023).
- Ishwaran, H. The effect of splitting on random forests. Mach. Learn. 2015, 99, 75–118. [Google Scholar] [CrossRef] [PubMed]
Datasets | Subjects | Features | Total Instances Per Feature | Instances vs. Class | Modified Instances vs. Class |
---|---|---|---|---|---|
WESAD | 15 | 65 | 135,650 | 71,640 baseline | 94,704 no-stress |
23,064 amusement | |||||
40,946 stress | 40,946 stress | ||||
SWELL | 22 | 67 | 391,638 | 212,400 no-stress | 212,400 no-stress |
110,943 interruption | 179,238 stress | ||||
68,295 time pressure | |||||
Combined WEDAD and SWELL | 37 | 63 | 527,288 | 220,184 stress | |
307,104 no-stress |
Confusion Matrix | Actual Values | ||
---|---|---|---|
Positive | Negative | ||
Predicted values | Positive | TP | FP |
Negative | FN | TN |
Features | Description [16] | Dataset |
---|---|---|
HR_SQRT | Square root of the mean of the sum of the squared differences between adjacent RR intervals | SWELL WESAD |
sampen | Sample entropy | SWELL |
MEAN_RR | Mean of all RR intervals | SWELL WESAD |
HR | Heart rate (beats per minute) | SWELL WESAD |
MEAN_RR_SQRT | Square root of the mean RR interval | SWELL WESAD |
MEAN_RR_LOG | Natural logarithm of the mean RR interval | SWELL WESAD |
MEDIAN_RR | Median of all RR intervals | SWELL WESAD |
LF_PCT | Low-frequency power as a percentage of total power | WESAD |
HF | High (0.15 Hz–0.4 Hz) frequency band of the HRV power spectrum | WESAD |
pNN25 | % of adjacent RR intervals differing by more than 25 ms | SWELL Combined |
KURT | Kurtosis of all RR intervals | Combined |
VLF | Very low (0.003 Hz–0.04 Hz) frequency band of the HRV power spectrum | Combined |
MEAN_REL_RR | Mean of all relative RR intervals | Combined |
HR_HF | Heart rate high frequency | Combined |
KURT_REL_RR | Kurtosis of all relative RR intervals | Combined |
TP | Total HRV power spectrum | Combined |
MEDIAN_REL_RR_LOG | Natural logarithm of the median relative RR interval | Combined |
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. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Dahal, K.; Bogue-Jimenez, B.; Doblas, A. Global Stress Detection Framework Combining a Reduced Set of HRV Features and Random Forest Model. Sensors 2023, 23, 5220. https://doi.org/10.3390/s23115220
Dahal K, Bogue-Jimenez B, Doblas A. Global Stress Detection Framework Combining a Reduced Set of HRV Features and Random Forest Model. Sensors. 2023; 23(11):5220. https://doi.org/10.3390/s23115220
Chicago/Turabian StyleDahal, Kamana, Brian Bogue-Jimenez, and Ana Doblas. 2023. "Global Stress Detection Framework Combining a Reduced Set of HRV Features and Random Forest Model" Sensors 23, no. 11: 5220. https://doi.org/10.3390/s23115220
APA StyleDahal, K., Bogue-Jimenez, B., & Doblas, A. (2023). Global Stress Detection Framework Combining a Reduced Set of HRV Features and Random Forest Model. Sensors, 23(11), 5220. https://doi.org/10.3390/s23115220