Adaptive Stress Prediction with GSR, SMOTE Balancing, and Random Forest Models

Authors

DOI:

https://doi.org/10.29207/resti.v9i4.6588

Keywords:

GSR sensor, perceived stress scale, random forest, SMOTE balancing, stress detection

Abstract

Stress is a pervasive condition that affects mental health, productivity, and quality of life across populations. Traditional methods for stress assessment, such as the Perceived Stress Scale (PSS), rely on retrospective self-reporting and are limited by subjectivity and delayed feedback. To address this gap, this study developed an integrated real-time stress monitoring system combining Galvanic Skin Response (GSR) sensors, Internet of Things (IoT) technology, and machine learning algorithms. Primary GSR data were collected from 30 participants under varied conditions, supplemented by secondary data from the WESAD dataset. A Random Forest classifier was employed to categorize stress into four levels: normal, mild, moderate, and severe. To address class imbalance, the Synthetic Minority Over-sampling Technique (SMOTE) was applied, leading to improved model robustness. The system achieved a cross-validated classification accuracy of 69%, with substantial improvements in the detection of moderate and severe stress cases compared to traditional threshold-based methods. A strong agreement (Cohen’s Kappa κ = 0.82) was observed between system predictions and PSS-based stress assessments. Feature importance analysis identified mean GSR value and Skin Conductance Response (SCR) amplitude as the most influential indicators of stress. The system was evaluated for usability, receiving high user ratings in terms of accessibility, simplicity, and interactivity. A simple Python-based command-line interface (CLI) was also developed for real-time stress prediction based on input features. This research demonstrates the feasibility and effectiveness of combining physiological sensing, predictive analytics, and user-friendly interfaces to enable scalable and adaptive stress monitoring. Future developments will focus on integrating additional physiological modalities and deep learning techniques to enhance predictive performance and personalization in clinical and everyday contexts.

Downloads

Download data is not yet available.

References

P. Chodavadia, I. Teo, D. Poremski, D. S. S. Fung, and E. A. Finkelstein, “Prevalence and economic burden of depression and anxiety symptoms among Singaporean adults: results from a 2022 web panel,” BMC Psychiatry, vol. 23, p. 104, Feb. 2023, doi: https://doi.org/10.1186/s12888-023-04581-7.

A. Jalali et al., “Global prevalence of depression, anxiety, and stress in the elderly population: a systematic review and meta-analysis,” BMC Geriatr., vol. 24, p. 809, Oct. 2024, doi: https://doi.org/10.1186/s12877-024-05311-8.

K. M. Harris, A. E. Gaffey, J. E. Schwartz, D. S. Krantz, and M. M. Burg, “The Perceived Stress Scale as a Measure of Stress: Decomposing Score Variance in Longitudinal Behavioral Medicine Studies,” Ann. Behav. Med. Publ. Soc. Behav. Med., vol. 57, no. 10, pp. 846–854, Apr. 2023, doi: https://doi.org/10.1093/abm/kaad015.

F. B. Larsen, M. Lasgaard, M. V. Willert, and J. B. Sørensen, “Perceived stress across population segments characterized by differing stressor profiles—A latent class analysis,” PLOS ONE, vol. 20, no. 1, p. e0316759, Jan. 2025, doi: https://doi.org/10.1371/journal.pone.0316759.

A. Almadhor et al., “Wrist-Based Electrodermal Activity Monitoring for Stress Detection Using Federated Learning,” Sensors, vol. 23, no. 8, Art. no. 8, Jan. 2023, doi: 10.3390/s23083984.

D. J. van der Mee, M. J. Gevonden, J. H. D. M. Westerink, and E. J. C. de Geus, “Validity of electrodermal activity-based measures of sympathetic nervous system activity from a wrist-worn device,” Int. J. Psychophysiol., vol. 168, pp. 52–64, Oct. 2021, doi: 10.1016/j.ijpsycho.2021.08.003.

A. Georgas, A. Panagiotakopoulou, G. Bitsikas, K. Vlantoni, A. Ferraro, and E. Hristoforou, “Stress Monitoring in Pandemic Screening: Insights from GSR Sensor and Machine Learning Analysis,” Biosensors, vol. 15, no. 1, Art. no. 1, Jan. 2025, doi: https://doi.org/10.3390/bios15010014.

S. Andonov, S. Georgiev, G. Tsenov, and V. Mladenov, “Wearable Device for Pulse, Oximetry and Galvanic Skin Response Recordings for Neuromarketing,” in 2024 13th International Conference on Modern Circuits and Systems Technologies (MOCAST), Jun. 2024, pp. 01–06. doi: https://doi.org/10.1109/MOCAST61810.2024.10615512.

A. Georgas, A. Panagiotakopoulou, G. Bitsikas, K. Vlantoni, A. Ferraro, and E. Hristoforou, “Stress Monitoring in Pandemic Screening: Insights from GSR Sensor and Machine Learning Analysis,” Biosensors, vol. 15, no. 1, Art. no. 1, Jan. 2025, doi: https://doi.org/10.3390/bios15010014.

P. Schmidt, A. Reiss, R. Duerichen, C. Marberger, and K. Van Laerhoven, “Introducing WESAD, a Multimodal Dataset for Wearable Stress and Affect Detection,” in Proceedings of the 20th ACM International Conference on Multimodal Interaction, in ICMI ’18. New York, NY, USA: Association for Computing Machinery, Oct. 2018, pp. 400–408. doi: https://doi.org/10.1145/3242969.3242985.

G. R. Reddy, J. J. Reddy, M. V. S. Reddy, I. Sravani, and V. K. A. Kumar, “Enhancing Stress Detection Employing Physiological Signals from the WESAD Dataset: A Machine Learning Approach with SMOTE,” Milest. Trans. Med. Technometrics, vol. 2, no. 2, Art. no. 2, Dec. 2024, doi: https://doi.org/10.5281/zenodo.14566207.

X. Yan, Z. Lin, Z. Lin, and B. Vucetic, “A Novel Exploitative and Explorative GWO-SVM Algorithm for Smart Emotion Recognition,” IEEE Internet Things J., vol. 10, no. 11, pp. 9999–10011, Jun. 2023, doi: https://doi.org/10.1109/JIOT.2023.3235356.

D. S. Benita, A. S. Ebenezer, L. Susmitha, M. S. P. Subathra, and S. J. Priya, “Stress Detection Using CNN on the WESAD Dataset,” in 2024 International Conference on Emerging Systems and Intelligent Computing (ESIC), Feb. 2024, pp. 308–313. doi: https://doi.org/10.1109/ESIC60604.2024.10481604.

H.-S. Choi, “Emotion Recognition Using a Siamese Model and a Late Fusion-Based Multimodal Method in the WESAD Dataset with Hardware Accelerators,” Electronics, vol. 14, no. 4, Art. no. 4, Jan. 2025, doi: https://doi.org/10.3390/electronics14040723.

A. Garg et al., “Inappropriate implantable cardioverter defibrillator discharge from sensing of external alternating current leak,” Journal Of Interventional Cardiac Electrophysiology, vol. 7, no. 2. Kluwer Academic Publ, Van Godewijckstraat 30, 3311 GZ Dordrecht, Netherlands, pp. 181–184, Oct. 2002. doi: 10.1023/A:1020846007149.

A. Mohammadi, M. Fakharzadeh, and B. Baraeinejad, “An Integrated Human Stress Detection Sensor Using Supervised Algorithms,” IEEE Sens. J., vol. 22, no. 8, pp. 8216–8223, Apr. 2022, doi: https://doi.org/10.1109/JSEN.2022.3157795.

A. Al-Nafjan and M. Aldayel, “Anxiety Detection System Based on Galvanic Skin Response Signals,” Appl. Sci., vol. 14, no. 23, Art. no. 23, Jan. 2024, doi: https://doi.org/10.3390/app142310788.

G. Mazumdar, K. Singh, and D. Sethia, “ML-based stress classification and detection using multimodal affect dataset,” in Advances in Networks, Intelligence and Computing, CRC Press, 2024.

E. Oliver and S. Dakshit, “Cross-Modality Investigation on WESAD Stress Classification,” Feb. 26, 2025, arXiv: arXiv:2502.18733. doi: https://doi.org/10.48550/arXiv.2502.18733.

M. A. Al Aleem, R. Mubarak, N. M. Salem, and I. Sadek, “A Deep Learning Approach Using WESAD Data for Multi-Class Classification with Wearable Sensors,” in 2024 6th Novel Intelligent and Leading Emerging Sciences Conference (NILES), Oct. 2024, pp. 194–197. doi: https://doi.org/10.1109/NILES63360.2024.10753228.

G. Vos, K. Trinh, Z. Sarnyai, and M. Rahimi Azghadi, “Ensemble machine learning model trained on a new synthesized dataset generalizes well for stress prediction using wearable devices,” J. Biomed. Inform., vol. 148, p. 104556, Dec. 2023, doi: https://doi.org/10.1016/j.jbi.2023.104556.

K. Dahal, B. Bogue-Jimenez, and A. Doblas, “Global Stress Detection Framework Combining a Reduced Set of HRV Features and Random Forest Model,” Sensors, vol. 23, no. 11, Art. no. 11, Jan. 2023, doi: https://doi.org/10.3390/s23115220.

Rawan S Abdulsadiq and Esther Rodriguez Villegas, “Frontiers | A comparative study in class imbalance mitigation when working with physiological signals,” Front. Digit. Health, vol. 6, Mar. 2024, doi: https://doi.org/10.3389/fdgth.2024.1377165.

G. R. Reddy, J. J. Reddy, M. V. S. Reddy, I. Sravani, and V. K. A. Kumar, “Enhancing Stress Detection Employing Physiological Signals from the WESAD Dataset: A Machine Learning Approach with SMOTE,” Milest. Trans. Med. Technometrics, vol. 2, no. 2, Art. no. 2, Dec. 2024, doi: https://doi.org/10.5281/zenodo.14566207.

M. Gjoreski, M. Luštrek, M. Gams, and H. Gjoreski, “Monitoring stress with a wrist device using context,” J. Biomed. Inform., vol. 73, pp. 159–170, Sep. 2017, doi: https://doi.org/10.1016/j.jbi.2017.08.006.

Downloads

Published

2025-08-17

Issue

Section

Computer Science Applications

How to Cite

Surakusumah, R. F., & Apza, R. Y. . (2025). Adaptive Stress Prediction with GSR, SMOTE Balancing, and Random Forest Models. Jurnal RESTI (Rekayasa Sistem Dan Teknologi Informasi), 9(4), 805-813. https://doi.org/10.29207/resti.v9i4.6588