Explainable Machine Learning Model for Stress Detection Using Heart Rate Variability Features
Keywords:
Stress Detection, Machine Learning, XGBoost, Explainable Artificial Intelligence, SHAPAbstract
Stress detection using machine learning techniques is considered one of the most promising research areas due to the direct impact of stress on mental and physical health as well as human performance, particularly in intelligent work environments. This study aims to develop an explainable model for stress detection based on physiological data obtained from the SWELL Knowledge Work Stress Dataset. The XGBoost model was adopted due to its high suitability for physiological medical data, which have complex nonlinear relationships and interactions among different biomarkers.
The model’s performance was evaluated using a set of standard metrics, including the confusion matrix, ROC–AUC curves, and precision–recall curves, which provided a comprehensive assessment of classification quality. Experimental results demonstrated that the proposed model achieved high and well-balanced classification performance across the three stress categories, with an overall F1-score of 95%. Moreover, the model exhibited near-perfect discriminative capability, achieving AUC-ROC values of 1.00 for all classes.
In addition to predictive performance, explainable artificial intelligence (XAI) techniques were employed using SHAP to analyze the contribution of different features to the model’s decisions, enabling an in-depth understanding of the most influential physiological factors in stress detection. These findings confirm that the proposed model effectively combines high accuracy with interpretability, enhancing its reliability and supporting its potential adoption in real-world applications and healthcare decision support systems.