In today\'s fast-paced world, mental stress has become a significant issue, contributing to numerous health issues and lower productivity. Early detection and prediction of stress levels can help individuals take timely preventive measures. Analyzing physiological, behavioral, and questionnaire-based data, this project presents a machine learning-based method for predicting mental stress. The system leverages various machine learning algorithms, including Support Vector Machines (SVM), Random Forest, and Logistic Regression, to classify stress levels into different categories such as low, moderate, and high. Heart rate, sleep patterns, physical activity, and responses to psychological assessment scales (such as the DASS-21 or Perceived Stress Scale) are among the data features used for prediction. The dataset is preprocessed for noise reduction, normalization, and missing value handling. Feature selection techniques such as PCA and correlation analysis are applied to enhance model performance. In order to guarantee the models\' robustness and generalizability, k-fold cross-validation is used to train and validate them. The Random Forest algorithm is a promising tool for real-time mental health monitoring because it predicts stress levels with the highest accuracy, as demonstrated by experimental results. This study demonstrates the potential for continuous stress monitoring and mental health support by combining machine learning with wearable sensors and mobile apps.
Introduction
I. Background and Objective
Stress is a physiological and emotional response to challenges and can negatively impact health. This study introduces an activity-aware mental stress detection system and a machine learning-based EEG analysis framework for accurate and real-time stress detection. The goal is to develop a model that detects stress levels using objective physiological data, improving over traditional subjective measures like questionnaires.
II. Types of Stress
Acute Stress: Short-term, easily managed, can be motivational.
Episodic Acute Stress: Frequent acute stress episodes, often anxiety-inducing.
Chronic Stress: Long-term, harmful to physical and mental health, difficult to measure and manage.
III. Physiological Markers for Stress Detection
Electrocardiograph (ECG): Heart rate and HRV.
Blood Pressure (BP): Elevated during stress; recovery time is a stress indicator.
Galvanic Skin Response (GSR): Skin conductivity changes with stress.
Electromyogram (EMG): Muscle activity changes under stress.
Skin and Body Temperature: Fluctuates during stress.
Pupil Diameter and Glucose Level: Less common but indicative.
IV. Activity-Aware Stress Detection System
Uses ECG, GSR, and accelerometer data from 20 participants.
Incorporates physical activity data to prevent misclassification.
Achieved 92.4% accuracy in classifying stress (10-fold cross-validation) and 80.9% in subject-wise classification.
Suitable for continuous real-world monitoring.
V. Problem Definition
Traditional stress detection lacks accuracy and real-time capabilities. This study proposes using EEG signals and hybrid machine learning techniques to improve feature extraction, classification, and real-time performance.
Problem Statement:
"To design and develop an efficient machine learning model capable of accurately detecting stress levels using EEG signals."
VI. Scope of the Work
Data Acquisition: Collect and clean EEG data.
Feature Extraction: Extract time and frequency domain features (e.g., mean, PSD).
Feature Selection: Use Random Forest to rank and select the most relevant features.
Hybrid Dataset: Combine selected time + frequency domain features.
Hybrid Classifier: Use stacking method combining Random Forest and XGBoost with a meta-classifier.
Evaluation: Use metrics like accuracy, precision, recall, and F1-score.
Applications: Real-time monitoring for healthcare, workplaces, and personal well-being.
VII. Workflow Summary
1. Preprocessing
EEG data filtered using FIR filter
Divided into 5-second epochs with 1-second overlap
2. Feature Extraction
Time domain: mean, std, variance, etc.
Frequency domain: PSD via Welch’s method
3. Feature Selection
Random Forest used to rank and select top 4 features
4. Hybrid Features Dataset
Merge selected time and frequency features into one dataset
5. Hybrid Classifier (HMC)
Stacking approach using Random Forest + XGBoost
Output used to train a meta-classifier for final prediction
6. Comparison of Results
Outperforms traditional models in accuracy and robustness
Conclusion
This study shows machine learning, especially [best-performing model], can accurately predict mental stress from physiological and behavioral data. This non-invasive method allows for early stress detection using wearable sensors and other data sources. Future research should focus on larger, diverse datasets and real-time integration into apps for improved stress management.
References
[1] Dr Des McLernon , Dr L Mhamdi : Analysis and Processing physiological data from a watch-likedevicetodetectstresspattern, TheUniversityofLeeds,August 2015.
[2] Feng-Tso Sun , Cynthia Kuo , Heng-Tze Cheng , SenakaButhpitiya , Patricia Collins : ActivityAware Mental Stress Detection Using Physiological Sensors, Institute for Computer Sciences,SocialInformaticsandTelecommunicationsEngineering2012.
[3] J. Minguillon, E. Perez, M. A. Lopez-Gordo, F. Pelayo, and M. J. Sanchez-Carrion, \"Portable system for real-time detection of stress level,\" Sensors, vol. 18, no. 8, p. 2504, Aug. 2018, doi: 10.3390/s18082504.
[4] Kalpesh Patil , Manisha Singh , Garima Singh :”Mental Stress Evalution using Heart rate variability analysis : A review” , ISSN volume 2 , April-2015
[5] F. Akhtar, M. B. B. Heyat, J. P. Li, P. K. Patel, and R. Guragai, \"Role of machine learning in human stress: A review,\" in 17th International Computer Conference on Wavelet Active Media Technology and Information Processing, 2020, pp. 170-174, doi: 10.1109/ICCWAMTIP51612.2020.9317396.
[6] A. Nirabi, F. A. Rahman, M. H. Habaebi, K. A. Sidek, and S. Yusoff, \"Machine learning-based stress level detection from EEG signals,\" in IEEE 7th International Conference on Smart Instrumentation, Measurement and Applications (ICSIMA), 2021, pp. 53-58, doi: 10.1109/ICSIMA50015.2021.9526333.
[7] O. AlShorman, M. Masadeh, M. B. B. Heyat, F. Akhtar, H. Almahasneh, G. M. Ashraf, and A. Alexiou, \"Frontal lobe real-time EEG analysis using machine learning techniques for mental stress detection,\" J. Integr. Neurosci., vol. 21, no. 1, pp. 1-11, Jan. 2022, doi: 10.31083/j.jin2101020.
[8] L. D. Sharma, V. K. Bohat, M. Habib, A. M. Al-Zoubi, H. Faris, and I. Aljarah, \"Evolutionary inspired approach for mental stress detection using EEG signal,\" Expert Systems with Applications, vol. 197, p. 116634, Feb. 2022, doi: 10.1016/j.eswa.2022.116634.
[9] J. Agrawal, M. Gupta, and H. Garg, \"Early stress detection and analysis using EEG signals in machine learning framework,\" IOP Conference Series: Material Science and Engineering, vol.1116, no.1, p. 012134, 2021, doi: 10.1088/1757-899X/1116/1/012134.