Stress Classification Using Heart Rate Variability and Machine Learning Models
Heart rate variability (HRV), representing the time interval between consecutive heartbeats, is a critical biomarker for assessing stress, depression, and anxiety levels. This study makes use of the SWELL-KW dataset, which contains electrocardiogram (ECG) recordings from 25 subjects (17 males, 8 females). ECG recordings were taken in three distinct physiological state: no stress, time pressure, and interruption. HRV parameters were taken of the time, frequency, and nonlinear domains for the classification of stress. The dataset was pre-processed with an interquartile range (25%–75%), which improved resilience and robustness against outliers. The features were adjusted to a 0-1 range using min-max scaling. The hyperparameter tuning was set depending on cross-validation accuracy. Euclidean distances were calculated between class centroids (no stress, time pressure, and interruption), demonstrating distinct differences between the three categories. The present work employed five machine learning models (MLM), namely decision trees (DT), random forests (RF), support vector machines (SVM), K-nearest neighbors (KNN), and adaptive boosting (AdaBoost), to categorize stress levels. The findings of the study shown a remarkable degree of accuracy, surpassing previous projections. Notably, the Random Forest, SVM, and KNN models had exceptional accuracy rates of 1.0, establishing them as the most effective classifiers. On the other hand, the Decision Tree and Adaboost models demonstrated higher levels of accuracy, with values of 0.87 and 0.71, respectively. This study highlights the potential of a proposed methodology on MLM for precise stress prediction using HRV, contributing to advancements in real-time mental health monitoring.
Authors
- Suman Halder (ORCID: https://orcid.org/0000-0003-0219-9562)
- Anindita Ganguly (ORCID: https://orcid.org/0000-0002-2880-2510)
- Vivek Ranjan (ORCID: https://orcid.org/0009-0006-6338-3848)
- Raghuwansh Singh
Institutions
- National Institute of Technology Durgapur (IN)
- Government of West Bengal (IN)
Publication Details
- Journal
- Procedia Computer Science
- Published
- 2025-01-01
- DOI
- https://doi.org/10.1016/j.procs.2025.04.674
- Citations
- 1
- Primary Topic
- Heart Rate Variability and Autonomic Control
- Type
- article
- Field-Weighted Citation Impact
- 1.39