Classification of Rest and a Stress-Inducing VR Task Using Heart Rate Variability and Machine Learning
Stress is associated with changes in cardiac autonomic regulation, which can be assessed through heart rate variability (HRV). The aim of the present study was to evaluate the ability of linear and nonlinear HRV features to distinguish between a resting state and VR-induced stress and to compare the classification performance of the Random Forest and LogitBoost algorithms. Two types of data were analysed: physiological data represented by HRV features calculated from RR interval series, and subjective data reflecting perceived stress levels. Subjective measures were not included as predictors in the machine learning models but were used for additional interpretation of the psychophysiological response to the VR task. Data from 55 participants were analysed, with 20-min ECG recordings obtained during rest and during a stressful VR game. Fourteen HRV features from the time and frequency domains, as well as nonlinear features including Poincaré plot indices and measures derived from other nonlinear methods, were evaluated. Both machine learning algorithms were evaluated using five-fold subject-wise nested cross-validation. Significant differences were observed in most HRV features, with the largest effect sizes found for the Hurst exponent (|dz| = 1.928), DFA α (|dz| = 1.608), and HRVti (|dz| = 1.159). Subjective stress ratings also showed a significant increase following the stressful VR task compared with the resting condition. Random Forest achieved an accuracy of 91.82%, sensitivity of 92.73%, specificity of 90.91%, and AUC of 0.9845, whereas LogitBoost achieved 93.64%, 90.91%, 96.36%, and 0.9769, respectively. These findings suggest that conventional and nonlinear HRV features may provide useful information for distinguishing between resting and VR-induced stress conditions. The Hurst exponent and DFA scaling exponent α showed particularly large effect sizes and high feature-selection stability. The use of subject-wise nested cross-validation provides an assessment of classification performance with respect to generalisation to new participants and reduces the risk of information leakage arising from dependent observations. The findings support the potential of HRV-based machine learning models for the automated discrimination of physiological states associated with experimentally induced stress in a controlled VR environment. However, potential confounding factors and the limited sample size should be considered when interpreting the classification performance, as the reported estimates may be subject to uncertainty. Further validation in larger and more diverse samples is needed to confirm the generalisability of these findings.
Authors
- Penio Lebamovski (ORCID: https://orcid.org/0000-0002-5713-5710)
- Evgeniya Peneva Gospodinova (ORCID: https://orcid.org/0000-0002-5471-678X)
Institutions
- Bulgarian Academy of Sciences (BG)
- Institute of Robotics (BG)
Publication Details
- Journal
- Sci
- Published
- 2026-11-13
- DOI
- https://doi.org/10.3390/sci8110371
- Primary Topic
- Heart Rate Variability and Autonomic Control
- Type
- article
- Field-Weighted Citation Impact
- 0.00