Optimizing Mental Stress Detection via Heart Rate Variability Feature Selection
Abstract
1. Introduction
2. Materials and Methods
2.1. Dataset and Data Preprocessing
2.2. Feature Selection Methods
2.2.1. Filter-Based Approach
2.2.2. Wrapper-Based Approach
2.2.3. Embedded Approach
2.3. Predictive Modeling and Cross-Validation Framework
Hyperparameter Optimization and Evaluation
3. Results
3.1. Filter-Based Approach
3.1.1. mRMR 10 Features
3.1.2. mRMR 20 Features
3.1.3. mRMR 30 Features
3.2. Wrapper-Based Approach
3.3. Embedded Approach
3.4. External Validation on Independent Dataset
4. Discussion
5. Limitations and Future Work
6. Conclusions
Supplementary Materials
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
Feature | Description |
HRV-MeanNN | Mean of RR intervals; reflects overall heart rate and vagal tone. |
HRV-SDNN | Standard deviation of RR intervals; indicates total HRV, influenced by both sympathetic and parasympathetic branches. |
HRV-SDANN1 | Std. dev. of the average RR intervals over 1 min segments; captures long-term HRV components. |
HRV-SDNNI1 | Mean of std. devs. of RR intervals from 1 min segments; reflects local short-term variability. |
HRV-SDANN2 | Std. dev. over 2 min segments; sensitive to slower autonomic oscillations. |
HRV-SDNNI2 | Mean of std. devs from 2 min segments; emphasizes short-term balance. |
HRV-SDANN5 | Std. dev. over 5 min averages; captures circadian and long-range effects. |
HRV-SDNNI5 | Mean of 5 min segment variabilities; shows fine-grained autonomic shifts. |
HRV-RMSSD | Root mean square of successive RR differences; reliable marker of vagal activity. |
HRV-SDSD | Std. dev. of successive RR differences; reflects rapid vagal modulations. |
HRV-CVNN | Coefficient of variation of RR intervals; normalized HRV variability. |
HRV-CVSD | RMSSD divided by mean RR; normalized index of parasympathetic activity. |
HRV-MedianNN | Median RR interval; robust estimate of central heart rhythm. |
HRV-MadNN | Median absolute deviation; resilient to outliers, reflects HR stability. |
HRV-MCVNN | MAD normalized by median; relative variability index. |
HRV-IQRNN | Interquartile range; dispersion of mid-range HRV. |
HRV-SDRMSSD | Ratio of SDNN to RMSSD; shows sympathetic–parasympathetic balance. |
HRV-Prc20NN | 20th percentile; indicative of lower HR bounds. |
HRV-Prc80NN | 80th percentile; indicative of upper HR bounds. |
HRV-pNN50 | Percentage of successive RR differences > 50 ms; robust vagal marker. |
HRV-pNN20 | Percentage of successive RR differences > 20 ms; sensitive to parasympathetic control. |
HRV-MinNN | Minimum RR; peaks in sympathetic drive. |
HRV-MaxNN | Maximum RR; denotes peak vagal influence. |
HRV-HTI | Histogram-based triangular index; overall HRV estimation. |
HRV-TINN | Width of RR histogram; reflects total variability. |
HRV-ULF | Ultra-low frequency power; linked to circadian and thermoregulatory influences. |
HRV-VLF | Very low frequency power; related to slow-acting regulatory systems. |
HRV-LF | Low frequency power; reflects both SNS and PNS activity. |
HRV-HF | High frequency power; closely tied to respiratory-linked vagal activity. |
HRV-VHF | Very high frequency; rarely used, possibly tied to respiratory drive. |
HRV-TP | Total spectral power; combined autonomic activity. |
HRV-LFHF | LF/HF ratio; widely used indicator of autonomic balance. |
HRV-LFn | Normalized LF power; better reflects sympathetic contribution. |
HRV-HFn | Normalized HF power; better captures vagal contribution. |
HRV-LnHF | Log of HF power; used for statistical normalization. |
HRV-SD1 | Short-term Poincaré axis; vagal activity. |
HRV-SD2 | Long-term axis; influenced by both branches of ANS. |
HRV-SD1SD2 | SD1/SD2 ratio; vagal dominance indicator. |
HRV-S | Area of Poincaré ellipse; composite HRV index. |
HRV-CSI | SD2/SD1; Cardiac Sympathetic Index. |
HRV-CVI | log(SD1 × SD2); Cardiac Vagal Index. |
HRV-CSI-Modified | Modified CSI; refined sympathetic activity measure. |
HRV-PIP | Percentage of inflection points; nonlinear HRV measure. |
HRV-IALS | Inverse average length of segments; fragmentation indicator. |
HRV-PSS | Percentage of short segments; instability in autonomic output. |
HRV-PAS | Percentage of alternating segments; switching in autonomic tone. |
HRV-GI | Guzik Index; vagal-mediated deceleration asymmetry. |
HRV-SI | Slope Index; asymmetry slope marker. |
HRV-AI | Area Index; captures distributional asymmetry. |
HRV-PI | Porta’s Index; general HRV asymmetry. |
HRV-C1d/a | Short-term deceleration/acceleration; vagal/sympathetic activity. |
HRV-SD1d/a | Short-term deceleration/acceleration variance. |
HRV-C2d/a | Long-term deceleration/acceleration contributions. |
HRV-SD2d/a | Long-term variability in deceleration/acceleration. |
HRV-Cd/a | Total deceleration/acceleration; summarizes vagal/sympathetic effects. |
HRV-SDNNd/a | Deceleration/acceleration-related SDNN components. |
HRV-DFA-alpha1 | Short-term detrended fluctuation; vagal fractal regulation. |
HRV-DFA-alpha2 | Long-term detrended fluctuation; system complexity. |
HRV-MFDFA-alpha1-Width | Multifractal spectrum width. |
HRV-MFDFA-alpha1-Peak | Multifractal spectrum peak. |
HRV-MFDFA-alpha1-Mean | Mean of multifractal spectrum. |
HRV-MFDFA-alpha1-Max | Max of multifractal spectrum. |
HRV-MFDFA-alpha1-Min | Min of multifractal spectrum. |
HRV-ApEn | Approximate entropy; irregularity of HR series. |
HRV-SampEn | Sample entropy; noise-robust HR complexity. |
HRV-ShanEn | Shannon entropy; distribution-based variability. |
HRV-FuzzyEn | Fuzzy entropy; robust to physiological noise. |
HRV-MSEn | Multiscale entropy; reflects system complexity across scales. |
HRV-CMSEn | Composite multiscale entropy; reflects system complexity across scales. |
HRV-RCMSEn | Refined composite multiscale entropy; reflects system complexity across scales. |
HRV-CD | Correlation dimension; fractal ANS dynamics. |
HRV-HFD | Higuchi fractal dimension; geometric complexity. |
HRV-KFD | Katz fractal dimension; time-series irregularity. |
HRV-LZC | Lempel–Ziv complexity; symbolic pattern complexity. |
Appendix A. Univariate Statistical Comparison of HRV Features Between Stress and Non-Stress Conditions
Feature | Stress (Mean ± SD) | Non-Stress (Mean ± SD) | p-Value |
---|---|---|---|
HRV-MSEn | 1.18 ± 0.11 | 1.09 ± 0.20 | 0.15 |
HRV-MFDFA-alpha2-Delta | −0.21 ± 0.40 | −0.52 ± 0.39 | 0.15 |
HRV-MFDFA-alpha2-Max | 0.55 ± 0.29 | 0.31 ± 0.32 | 0.22 |
HRV-MFDFA-alpha2-Asymmetry | −0.38 ± 0.21 | −0.26 ± 0.16 | 0.22 |
HRV-MFDFA-alpha2-Width | 0.29 ± 0.10 | 0.45 ± 0.20 | 0.27 |
HRV-SDNNI1 | 74.44 ± 18.05 | 89.90 ± 30.72 | 0.27 |
HRV-MFDFA-alpha2-Increment | 0.01 ± 0.00 | 0.02 ± 0.02 | 0.27 |
HRV-C1a | 0.43 ± 0.06 | 0.39 ± 0.05 | 0.27 |
HRV-C2d | 0.46 ± 0.02 | 0.44 ± 0.02 | 0.27 |
HRV-MFDFA-alpha1-Width | 2.19 ± 0.73 | 1.78 ± 0.62 | 0.27 |
HRV-C1d | 0.57 ± 0.06 | 0.61 ± 0.05 | 0.27 |
HRV-C2a | 0.54 ± 0.02 | 0.56 ± 0.02 | 0.27 |
HRV-CSI-Modified | 3571.42 ± 1778.81 | 4137.19 ± 1640.41 | 0.27 |
HRV-MCVNN | 0.16 ± 0.03 | 0.20 ± 0.07 | 0.27 |
HRV-Ca | 0.53 ± 0.02 | 0.55 ± 0.02 | 0.32 |
HRV-Cd | 0.47 ± 0.02 | 0.45 ± 0.02 | 0.32 |
HRV-SDNNI2 | 80.49 ± 19.61 | 97.11 ± 33.65 | 0.32 |
HRV-SD2 | 175.25 ± 32.40 | 212.01 ± 68.82 | 0.39 |
HRV-HTI | 32.70 ± 8.31 | 41.75 ± 14.81 | 0.39 |
HRV-PAS | 0.07 ± 0.03 | 0.05 ± 0.02 | 0.39 |
HRV-MadNN | 127.53 ± 28.63 | 166.92 ± 64.10 | 0.39 |
HRV-pNN50 | 20.95 ± 14.32 | 26.91 ± 17.15 | 0.39 |
HRV-HFn | 0.11 ± 0.05 | 0.12 ± 0.04 | 0.39 |
HRV-MFDFA-alpha1-Increment | 0.33 ± 0.16 | 0.25 ± 0.12 | 0.39 |
HRV-LFHF | 3.44 ± 1.75 | 2.83 ± 1.12 | 0.39 |
HRV-SD2d | 118.69 ± 21.11 | 140.84 ± 44.60 | 0.45 |
HRV-SD2a | 128.88 ± 24.88 | 158.40 ± 52.64 | 0.45 |
HRV-ShanEn | 8.36 ± 0.26 | 8.57 ± 0.46 | 0.45 |
HRV-PI | 52.70 ± 2.17 | 53.87 ± 1.60 | 0.45 |
HRV-MFDFA-alpha2-Fluctuation | 0.00 ± 0.00 | 0.00 ± 0.00 | 0.45 |
HRV-HFD | 1.64 ± 0.11 | 1.68 ± 0.10 | 0.45 |
HRV-CVSD | 0.07 ± 0.02 | 0.08 ± 0.03 | 0.45 |
HRV-CVNN | 0.16 ± 0.03 | 0.19 ± 0.05 | 0.45 |
HRV-MinNN | 356.12 ± 34.64 | 380.00 ± 52.36 | 0.45 |
HRV-SDNNI5 | 89.91 ± 20.89 | 107.59 ± 37.38 | 0.45 |
HRV-KFD | 3.04 ± 0.38 | 3.26 ± 0.52 | 0.52 |
HRV-SDNNd | 86.86 ± 15.54 | 103.40 ± 33.84 | 0.52 |
HRV-SDNNa | 93.14 ± 17.81 | 114.03 ± 38.32 | 0.52 |
HRV-CVI | 5.01 ± 0.21 | 5.13 ± 0.34 | 0.52 |
HRV-S | 22,505.91 ± 11,372.80 | 36,455.01 ± 29,152.34 | 0.52 |
HRV-SDANN5 | 84.46 ± 20.16 | 100.94 ± 39.80 | 0.52 |
HRV-SDANN2 | 91.26 ± 20.62 | 108.52 ± 40.81 | 0.52 |
HRV-SDANN1 | 95.58 ± 20.17 | 114.03 ± 42.12 | 0.52 |
HRV-MFDFA-alpha2-Mean | 1.09 ± 0.14 | 1.18 ± 0.19 | 0.52 |
HRV-RCMSEn | 1.96 ± 0.15 | 1.96 ± 0.22 | 0.52 |
HRV-LFn | 0.31 ± 0.09 | 0.28 ± 0.05 | 0.52 |
HRV-MFDFA-alpha1-Delta | 1.05 ± 1.40 | 0.63 ± 1.48 | 0.52 |
HRV-IQRNN | 181.17 ± 41.47 | 226.56 ± 87.40 | 0.52 |
HRV-SD1d | 30.05 ± 11.62 | 37.56 ± 20.90 | 0.60 |
HRV-MFDFA-alpha1-Max | −0.14 ± 1.11 | −0.00 ± 1.34 | 0.60 |
HRV-MFDFA-alpha2-Peak | 1.04 ± 0.08 | 1.05 ± 0.09 | 0.60 |
HRV-pNN20 | 49.73 ± 15.89 | 54.06 ± 15.43 | 0.60 |
HRV-SDNN | 127.37 ± 23.53 | 153.95 ± 51.04 | 0.60 |
HRV-MaxNN | 1422.24 ± 245.22 | 1376.43 ± 217.37 | 0.64 |
HRV-SDRMSSD | 2.57 ± 1.03 | 2.54 ± 0.74 | 0.69 |
HRV-HF | 0.00 ± 0.00 | 0.00 ± 0.00 | 0.69 |
HRV-LnHF | −9.36 ± 1.13 | −9.09 ± 1.07 | 0.69 |
HRV-AI | 50.07 ± 0.09 | 50.11 ± 0.11 | 0.69 |
HRV-SD1SD2 | 0.23 ± 0.07 | 0.22 ± 0.06 | 0.69 |
HRV-ULF | 0.00 ± 0.00 | 0.00 ± 0.00 | 0.69 |
HRV-CSI | 5.03 ± 2.09 | 4.98 ± 1.50 | 0.69 |
HRV-VHF | 0.00 ± 0.00 | 0.00 ± 0.00 | 0.69 |
HRV-SD1a | 25.76 ± 9.57 | 29.37 ± 14.72 | 0.77 |
HRV-CD | 1.34 ± 0.14 | 1.39 ± 0.17 | 0.77 |
HRV-MFDFA-alpha1-Fluctuation | 0.00 ± 0.00 | 0.00 ± 0.00 | 0.77 |
HRV-PIP | 0.42 ± 0.04 | 0.41 ± 0.05 | 0.77 |
HRV-MFDFA-alpha1-Peak | 1.60 ± 0.28 | 1.57 ± 0.33 | 0.77 |
HRV-Prc80NN | 894.49 ± 98.21 | 940.71 ± 158.46 | 0.77 |
HRV-LZC | 0.41 ± 0.13 | 0.45 ± 0.11 | 0.77 |
HRV-IALS | 0.41 ± 0.04 | 0.39 ± 0.05 | 0.86 |
HRV-MFDFA-alpha1-Asymmetry | −0.56 ± 0.22 | −0.54 ± 0.20 | 0.86 |
HRV-RMSSD | 56.08 ± 21.01 | 67.49 ± 36.03 | 0.86 |
HRV-PSS | 0.64 ± 0.06 | 0.61 ± 0.09 | 0.86 |
HRV-FuzzyEn | 0.63 ± 0.18 | 0.65 ± 0.16 | 0.86 |
HRV-SDSD | 56.08 ± 21.01 | 67.49 ± 36.03 | 0.86 |
HRV-SD1 | 39.66 ± 14.86 | 47.72 ± 25.48 | 0.86 |
HRV-MeanNN | 785.13 ± 89.89 | 802.72 ± 121.32 | 0.86 |
HRV-MFDFA-alpha1-Mean | 1.51 ± 0.31 | 1.55 ± 0.33 | 0.86 |
HRV-CMSEn | 1.33 ± 0.07 | 1.29 ± 0.12 | 0.86 |
HRV-ApEn | 1.02 ± 0.27 | 1.05 ± 0.26 | 0.95 |
HRV-SampEn | 0.84 ± 0.28 | 0.82 ± 0.31 | 0.95 |
HRV-DFA-alpha1 | 1.29 ± 0.15 | 1.28 ± 0.18 | 0.95 |
HRV-GI | 49.99 ± 0.03 | 50.00 ± 0.04 | 0.95 |
HRV-TP | 0.00 ± 0.00 | 0.00 ± 0.00 | 0.95 |
HRV-LF | 0.00 ± 0.00 | 0.00 ± 0.00 | 0.95 |
HRV-VLF | 0.00 ± 0.00 | 0.00 ± 0.00 | 0.95 |
HRV-SI | 49.91 ± 0.07 | 49.91 ± 0.09 | 1.00 |
HRV-Prc20NN | 668.57 ± 92.24 | 658.04 ± 106.06 | 1.00 |
HRV-MedianNN | 791.73 ± 95.18 | 807.41 ± 129.53 | 1.00 |
HRV-DFA-alpha2 | 1.02 ± 0.07 | 1.02 ± 0.09 | 1.00 |
References
- Vaseghi, M.; Shivkumar, K. The role of the autonomic nervous system in sudden cardiac death. Prog. Cardiovasc. Dis. 2008, 50, 404–419. [Google Scholar] [CrossRef] [PubMed]
- Gianaros, P.J.; Jennings, J.R. Host in the machine: A neurobiological perspective on psychological stress and cardiovascular disease. Am. Psychol. 2018, 73, 1031–1044. [Google Scholar] [CrossRef] [PubMed]
- Arnsten, A.F. Stress signalling pathways that impair prefrontal cortex structure and function. Nat. Rev. Neurosci. 2009, 10, 410–422. [Google Scholar] [CrossRef] [PubMed]
- Kelloway, E.K.; Dimoff, J.K.; Gilbert, S. Mental health in the workplace. Annu. Rev. Organ. Psychol. Organ. Behav. 2023, 10, 363–387. [Google Scholar] [CrossRef]
- Task Force of the European Society of Cardiology and the North American Society of Pacing and Electrophysiology. Heart rate variability: Standards of measurement, physiological interpretation, and clinical use. Circulation 1996, 93, 1043–1065. [Google Scholar] [CrossRef]
- Mather, M.; Thayer, J.F. How heart rate variability affects emotion regulation brain networks. Curr. Opin. Behav. Sci. 2018, 19, 98–104. [Google Scholar] [CrossRef]
- Tadic, M.; Cuspidi, C.; Grassi, G. Heart rate as a predictor of cardiovascular risk. Eur. J. Clin. Investig. 2018, 48, e12892. [Google Scholar] [CrossRef]
- Nuamah, J. Effect of recurrent task-induced acute stress on task performance, vagally mediated heart rate variability, and task-evoked pupil response. Int. J. Psychophysiol. 2024, 198, 112325. [Google Scholar] [CrossRef]
- Togo, F.; Takahashi, M. Heart rate variability in occupational health—A systematic review. Ind. Health 2009, 47, 589–602. [Google Scholar] [CrossRef]
- Salankar, N.; Koundal, D.; Mian Qaisar, S. Stress Classification by Multimodal Physiological Signals Using Variational Mode Decomposition and Machine Learning. J. Healthc. Eng. 2021, 2021, 2146369. [Google Scholar] [CrossRef]
- Lucini, D.; Marchetti, I.; Spataro, A.; Malacarne, M.; Benzi, M.; Tamorri, S.; Sala, R.; Pagani, M. Heart rate variability to monitor performance in elite athletes: Criticalities and avoidable pitfalls. Int. J. Cardiol. 2017, 240, 307–312. [Google Scholar] [CrossRef] [PubMed]
- Ihianle, I.K.; Machado, P.; Owa, K.; Adama, D.A.; Otuka, R.; Lotfi, A. Minimising redundancy, maximising relevance: HRV feature selection for stress classification. Expert Syst. Appl. 2024, 239, 122490. [Google Scholar] [CrossRef]
- Roy, S.; Behradfar, M.; Nuamah, J. Unveiling Stress Responses through Heart Rate Variability Analysis: A Machine Learning Approach. In Proceedings of the IISE Annual Conference, Montreal, QC, Canada, 18–21 May 2024; pp. 1–6. [Google Scholar]
- Tang, C.; Huang, Q.; Shen, Q.; Zhou, Q.; Kong, X.; Zhou, N. Convolutional neural networks improved HRV analysis accuracy by single-lead Holter. Res. Sq. 2023. [Google Scholar] [CrossRef]
- Dhananjay, B.; Sivaraman, J. Prediction of cardiac rhythm based on heart rate variability features in sinus tachycardia conditions. In Proceedings of the 2021 Seventh International Conference on Bio Signals, Images, and Instrumentation (ICBSII), Chennai, India, 25–27 March 2021; pp. 1–6. [Google Scholar] [CrossRef]
- Chauhan, N.K.; Singh, K. A Review on Conventional Machine Learning vs Deep Learning. In Proceedings of the 2018 International Conference on Computing, Power and Communication Technologies (GUCON), Greater Noida, Uttar Pradesh, India, 28–29 September 2018; pp. 347–352. [Google Scholar] [CrossRef]
- Peng, H.; Long, F.; Ding, C. Feature selection based on mutual information criteria of max-dependency, max-relevance, and min-redundancy. IEEE Trans. Pattern Anal. Mach. Intell. 2005, 27, 1226–1238. [Google Scholar] [CrossRef] [PubMed]
- Guyon, I.; Weston, J.; Barnhill, S.; Vapnik, V. Gene selection for cancer classification using support vector machines. Mach. Learn. 2002, 46, 389–422. [Google Scholar] [CrossRef]
- Tibshirani, R. Regression Shrinkage and Selection Via the Lasso. J. R. Stat. Soc. Ser. B Stat. Methodol. 1996, 58, 267–288. [Google Scholar] [CrossRef]
- Byun, S.; Kim, A.Y.; Jang, E.H.; Kim, S.; Choi, K.W.; Yu, H.Y.; Jeon, H.J. Entropy analysis of heart rate variability and its application to recognize major depressive disorder: A pilot study. Technol. Health Care Off. J. Eur. Soc. Eng. Med. 2019, 27, 407–424. [Google Scholar] [CrossRef]
- Shikha, S.; Sethia, D.; Indu, S. Optimization of Wearable Biosensor Data for Stress Classification Using Machine Learning and Explainable AI. IEEE Access 2024, 12, 169310–169327. [Google Scholar] [CrossRef]
- Varma, S.; Simon, R. Bias in error estimation when using cross-validation for model selection. BMC Bioinform. 2006, 7, 91. [Google Scholar] [CrossRef]
- Su, J.; Zhu, J.; Song, T.; Chang, H. Subject-Independent EEG Emotion Recognition Based on Genetically Optimized Projection Dictionary Pair Learning. Brain Sci. 2023, 13, 977. [Google Scholar] [CrossRef]
- Wainer, J.; Cawley, G. Nested cross-validation when selecting classifiers is overzealous for most practical applications. Expert Syst. Appl. 2021, 182, 115222. [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, Boulder, CO, USA, 16–20 October 2018; pp. 400–408. [Google Scholar] [CrossRef]
- Makowski, D.; Pham, T.; Lau, Z.J.; Brammer, J.C.; Lespinasse, F.; Pham, H.; Schölzel, C.; Chen, S.A. NeuroKit2: A Python toolbox for neurophysiological signal processing. Behav. Res. Methods 2021, 53, 1689–1696. [Google Scholar] [CrossRef] [PubMed]
- Sathyapriya, L.; Murali, L.; Manigandan, T. Analysis and detection R-peak detection using Modified Pan-Tompkins algorithm. In Proceedings of the 2014 IEEE International Conference on Advanced Communications, Control and Computing Technologies, Ramanathapuram, India, 8–10 May 2014; pp. 483–487. [Google Scholar]
- Amin, M.R.; Wickramasuriya, D.; Faghih, R.T. A Wearable Exam Stress Dataset for Predicting Cognitive Performance in Real-World Settings (version 1.0.0). PhysioNet 2022. [Google Scholar] [CrossRef]
- Das, U.; Srizon, A.Y.; Hasan, M.A.M. Accurate Recognition of Coronary Artery Disease by Applying Machine Learning Classifiers. In Proceedings of the 2020 23rd International Conference on Computer and Information Technology (ICCIT), Dhaka, Bangladesh, 19–21 December 2020; pp. 1–6. [Google Scholar] [CrossRef]
- 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. [Google Scholar] [CrossRef]
- Brownlee, J. Data Preparation for Machine Learning: Data Cleaning, Feature Selection, and Data Transforms in Python; Machine Learning Mastery: Vermont, Australia, 2020. [Google Scholar]
- 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]
- Breiman, L. Random forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef]
- Chen, T.; Guestrin, C. Xgboost: A scalable tree boosting system. In Proceedings of the 22nd acm sigkdd International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 785–794. [Google Scholar]
- Powers, D.M. Evaluation: From precision, recall and F-measure to ROC, informedness, markedness and correlation. arXiv 2020, arXiv:2010.16061. [Google Scholar]
- Shaffer, F.; McCraty, R.; Zerr, C.L. A healthy heart is not a metronome: An integrative review of the heart’s anatomy and heart rate variability. Front. Psychol. 2014, 5, 1040. [Google Scholar] [CrossRef]
- Shaffer, F.; Ginsberg, J.P. An overview of heart rate variability metrics and norms. Front. Public Health 2017, 5, 258. [Google Scholar] [CrossRef]
- Billman, G.E. The LF/HF ratio does not accurately measure cardiac sympatho-vagal balance. Front. Physiol. 2013, 4, 26. [Google Scholar] [CrossRef]
- Goldberger, J.J.; Challapalli, S.; Tung, R.; Parker, M.A.; Kadish, A.H. Relationship of heart rate variability to parasympathetic effect. Circulation 2001, 103, 1977–1983. [Google Scholar] [CrossRef] [PubMed]
- Berntson, G.G.; Thomas Bigger, J., Jr.; Eckberg, D.L.; Grossman, P.; Kaufmann, P.G.; Malik, M.; Nagaraja, H.N.; Porges, S.W.; Saul, J.P.; Stone, P.H.; et al. Heart rate variability: Origins, methods, and interpretive caveats. Psychophysiology 1997, 34, 623–648. [Google Scholar] [CrossRef] [PubMed]
- 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]
Number of Features | Selected Features | Classifier | F1 Score (95% CI) |
---|---|---|---|
10 | HRV-MFDFA-alpha2-Width, HRV-pNN50, HRV-Cd, HRV-MFDFA-alpha2-Increment, HRV-MinNN, HRV-Ca, HRV-MSEn, HRV-MFDFA-alpha2-Fluctuation, HRV-MadNN, HRV-C2d | GB | 0.67 (0.62, 0.72) |
RF | 0.57 (0.52, 0.62) | ||
SVM | 0.61 (0.53, 0.68) | ||
XGB | 0.62 (0.57, 0.67) | ||
20 | HRV-MFDFA-alpha2-Width, HRV-pNN50, HRV-Cd, HRV-MFDFA-alpha2-Increment, HRV-MinNN, HRV-Ca, HRV-MSEn, HRV-MFDFA-alpha2-Fluctuation, HRV-MadNN, HRV-C2d, HRV-MFDFA-alpha2-Max, HRV-PAS, HRV-MCVNN, HRV-C2a, HRV-MFDFA-alpha2-Delta, HRV-HTI, HRV-MFDFA-alpha1-Increment, HRV-C1d, HRV-C1a, HRV-SD2a | GB | 0.66 (0.61, 0.70) |
RF | 0.58 (0.52, 0.63) | ||
SVM | 0.46 (0.40, 0.51) | ||
XGB | 0.60 (0.54, 0.65) | ||
30 | HRV-MFDFA-alpha2-Width, HRV-pNN50, HRV-Cd, HRV-MFDFA-alpha2-Increment, HRV-MinNN, HRV-Ca, HRV-MSEn, HRV-MFDFA-alpha2-Fluctuation, HRV-MadNN, HRV-C2d, HRV-MFDFA-alpha2-Max, HRV-PAS, HRV-MCVNN, HRV-C2a, HRV-MFDFA-alpha2-Delta, HRV-HTI, HRV-MFDFA-alpha1-Increment, HRV-C1d, HRV-C1a, HRV-SD2a, HRV-MFDFA-alpha1-Width, HRV-SDNNI1, HRV-PI, HRV-SDNNa, HRV-MFDFA-alpha2-Asymmetry, HRV-SD2, HRV-IQRNN, HRV-S, HRV-SDNN, HRV-SDNNI2 | GB | 0.63 (0.57, 0.69) |
RF | 0.52 (0.46, 0.57) | ||
SVM | 0.51 (0.47, 0.56) | ||
XGB | 0.60 (0.55, 0.66) |
Classifier | Selected Features | Average F1 Score (95% CI) |
---|---|---|
GB | HRV-MCVNN, HRV-LFn | 0.76 (0.71, 0.82) |
RF | HRV-MCVNN | 0.57 (0.49, 0.66) |
SVM | HRV-SDANN1, HRV-SDANN2, HRV-SDNNI2, HRV-MadNN, HRV-pNN20, HRV-MinNN, HRV-SD2d | 0.46 (0.38, 0.55) |
XGB | HRV-MCVNN, HRV-MSEn | 0.49 (0.41, 0.57) |
Feature Selection Method | Selected Features | Classifier | Average F1 Score (95% CI) |
---|---|---|---|
LASSO | HRV-MFDFA-alpha2-Width, HRV-MinNN, HRV-LF, HRV-LFn, HRV-MSEn, HRV-MadNN, HRV-Cd | GB | 0.40 (0.14, 0.68) |
RF | 0.73 (0.56, 0.90) | ||
SVM | 0.46 (0.18, 0.74) | ||
XGB | 0.75 (0.71, 0.78) | ||
Tree-Based | HRV-SD2d, HRV-LF, HRV-SI, HRV-SDNNd, HRV-PSS, HRV-MFDFA-alpha1-Max, HRV-MFDFA-alpha1-Mean, HRV-MFDFA-alpha1-Peak, HRV-MFDFA-alpha1-Width, HRV-MSEn, HRV-PAS, HRV-MCVNN, HRV-C1d, HRV-PIP | GB | 0.33 (0.15, 0.61) |
XGB | 0.40 (0.12, 0.68) | ||
RF | 0.20 (0.12, 0.42) |
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. |
© 2025 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
Behradfar, M.; Roy, S.; Nuamah, J. Optimizing Mental Stress Detection via Heart Rate Variability Feature Selection. Sensors 2025, 25, 4154. https://doi.org/10.3390/s25134154
Behradfar M, Roy S, Nuamah J. Optimizing Mental Stress Detection via Heart Rate Variability Feature Selection. Sensors. 2025; 25(13):4154. https://doi.org/10.3390/s25134154
Chicago/Turabian StyleBehradfar, Mohsen, Shotabdi Roy, and Joseph Nuamah. 2025. "Optimizing Mental Stress Detection via Heart Rate Variability Feature Selection" Sensors 25, no. 13: 4154. https://doi.org/10.3390/s25134154
APA StyleBehradfar, M., Roy, S., & Nuamah, J. (2025). Optimizing Mental Stress Detection via Heart Rate Variability Feature Selection. Sensors, 25(13), 4154. https://doi.org/10.3390/s25134154