Stress Monitoring Using Machine Learning, IoT and Wearable Sensors
Abstract
:1. Introduction
2. The Literature Review
- Absence of User-Friendly Stress Detection Wearables: The nonexistence of user-friendly wearable devices explicitly designed for stress detection obstructs user engagement and the acceptance of stress management solutions;
- Automated Stress Detection and Classification Missing: Many automated systems lack robust methodologies for the automatic identification and categorization of stress levels, thereby limiting their effectiveness in timely interventions;
- Limited Incorporation of Multiple Stress Detection Features: Several studies failed to consider the integration of various features for accurate stress detection and evaluation, potentially leading to incomplete or imprecise stress monitoring.
Hypothesis for Stress Level Detection
3. Proposed Method
3.1. Stress-Track Sensing Wrist Band
3.1.1. Body Temperature
3.1.2. Humidity Analysis
3.1.3. Step Count Analysis
3.2. Dataset
3.3. Classifier
3.3.1. Random Forest
3.3.2. Gradient Boosting (GB)
3.3.3. Stacked Ensemble Method (SEM)
- Base Model 1 predicts: Prediction_1;
- Base Model 2 predicts: Prediction_2;
- Base Model 3 predicts: Prediction_3;
- ...
- Input features: [Prediction_1, Prediction_2, Prediction_3, …];
- Meta-model generates the final prediction: Final_Prediction.
- A.
- Data Acquisition and Preprocessing
- i.
- Load the “Stress-Lysis.csv” dataset containing humidity, temperature, step count, and stress level;
- ii.
- Split the dataset into features (humidity, temperature, step count) and target variables (stress level);
- iii.
- Encode the categorical target variables (low, normal, high stress) into numerical values (0, 1, 2);
- iv.
- Perform any necessary data cleaning and preprocessing.
- B.
- Stress-Track Sensing Wrist Band
- a.
- Body Temperature Measurement
- i.
- Select appropriate temperature sensors (contact or non-contact);
- ii.
- Collect temperature data from the body;
- iii.
- Analyze temperature patterns for health assessment.
- b.
- Humidity Analysis
- i.
- Utilize humidity-detecting sensors;
- ii.
- Monitor sweat secretion on the palms;
- iii.
- Analyze sweat levels for stress and arousal insights.
- c.
- Step Count Analysis
- i.
- Employ an accelerometer sensor;
- ii.
- Measure the individual’s step count.
- C.
- Machine Learning Model
- i.
- Initialize the ensemble model (stacked ensemble);
- ii.
- Divide the dataset into training and testing sets.
- a.
- Base Models (Level-0)
- i.
- Train individual base models (e.g., Random Forest, Gradient Boosting) on the training data;
- ii.
- Generate predictions for stress levels on the testing data using base models.
- b.
- Meta-Model (Level-1)
- i.
- Collect predictions from the base models;
- ii.
- Train a meta-model (e.g., another Random Forest or Gradient Boosting) on the training data with base model predictions as features;
- iii.
- Use the meta-model to generate the final stress level predictions for the testing data.
- D.
- Evaluation
- i.
- Assess the model’s performance using various metrics:
- -
- Accuracy;
- -
- Confusion matrix (true positives, true negatives, false positives, false negatives);
- -
- Precision;
- -
- Recall;
- -
- F1 measure.
4. Experimentation
4.1. Performance Matrices
- The percentage of accurate predictions made by the model is measured by accuracy;
- The confusion matrix is a table that compares the actual and anticipated classifications to summarize the presentation of a classifier.
4.2. Results and Discussion
5. Conclusions and Future Work
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Kadhim, K.T.; Alsahlany, A.M.; Wadi, S.M.; Kadhum, H.T. An Overview of Patient’s Health Status Monitoring System Based on Internet of Things (IoT). Wirel. Pers. Commun. 2020, 114, 2235–2262. [Google Scholar] [CrossRef]
- Mohammed, C.M.; Askar, S. Machine learning for IoT healthcare applications: A review. Int. J. Sci. Bus. 2021, 5, 42–51. [Google Scholar]
- Sadad, T.; Safran, M.; Khan, I.; Alfarhood, S.; Khan, R.; Ashraf, I. Efficient Classification of ECG Images Using a Lightweight CNN with Attention Module and IoT. Sensors 2023, 23, 7697. [Google Scholar] [CrossRef]
- Talaat, F.M.; El-Balka, R.M. Stress monitoring using wearable sensors: IoT techniques in medical field. Neural Comput. Appl. 2023, 35, 18571–18584. [Google Scholar] [CrossRef] [PubMed]
- Jalali, E.; Soltanizadeh, H.; Chen, Y.; Xie, Y.M.; Sareh, P. Selective hinge removal strategy for architecting hierarchical auxetic metamaterials. Commun. Mater. 2022, 3, 97. [Google Scholar] [CrossRef]
- Chen, Y.; Xu, R.; Lu, C.; Liu, K.; Feng, J.; Sareh, P. Multistability of the hexagonal origami hypar based on group theory and symmetry breaking. Int. J. Mech. Sci. 2023, 247, 108196. [Google Scholar] [CrossRef]
- He, Z.; Shi, K.; Li, J.; Chao, J. Self-assembly of DNA origami for nanofabrication, biosensing, drug delivery, and computational storage. iScience 2023, 26, 106638. [Google Scholar] [CrossRef]
- Jayadev, P.G.; Bellary, S. A hybrid approach for classification and identification of iris damaged levels of alcohol drinkers. J. King Saud. Univ-Comput. Inf. Sci. 2022, 34, 5273–5285. [Google Scholar]
- Rao, Z.; Tung, P.Y.; Xie, R.; Wei, Y.; Zhang, H.; Ferrari, A.; Klaver, T.P.; Körmann, F.; Sukumar, P.T.; Kwiatkowski da Silva, A.; et al. Machine learning–enabled high-entropy alloy discovery. Science 2022, 378, 78–85. [Google Scholar] [CrossRef]
- Sun, W.; Guo, Z.; Yang, Z.; Wu, Y.; Lan, W.; Liao, Y.; Wu, X.; Liu, Y. A review of recent advances in vital signals monitoring of sports and health via flexible wearable sensors. Sensors 2022, 22, 7784. [Google Scholar] [CrossRef]
- Rachakonda, L.; Mohanty, S.P.; Kougianos, E.; Sundaravadivel, P. Stress-Lysis: A DNN-Integrated Edge Device for Stress Level Detection in the IoMT. IEEE Trans. Consum. Electron. 2019, 65, 474–483. [Google Scholar] [CrossRef]
- Khan, A.R.; Saba, T.; Sadad, T.; Nobanee, H.; Bahaj, S.A. Identification of anomalies in mammograms through internet of medical things (IoMT) diagnosis system. Comput. Intell. Neurosci. 2022, 2022, 1100775. [Google Scholar] [CrossRef] [PubMed]
- Rosenzweig, C.; Karoly, D.; Vicarelli, M.; Neofotis, P.; Wu, Q.; Casassa, G.; Menzel, A.; Root, T.L.; Estrella, N.; Seguin, B.; et al. Attributing physical and biological impacts to anthropogenic climate change. Nature 2008, 453, 353–357. [Google Scholar] [CrossRef] [PubMed]
- Alanazi, H.O.; Abdullah, A.H.; Qureshi, K.N. A critical review for developing accurate and dynamic predictive models using machine learning methods in medicine and health care. J. Med. Syst. 2017, 41, 69. [Google Scholar] [CrossRef] [PubMed]
- Atzori, L. The internet of things: A survey. Comput. Netw. 2010, 54, 2787–2805. [Google Scholar] [CrossRef]
- Nath, R.K.; Thapliyal, H.; Caban-Holt, A.; Mohanty, S.P. Machine Learning based Solutions for Real-Time Stress Monitoring. IEEE Consum. Electron. Mag. 2020, 9, 34–41. [Google Scholar] [CrossRef]
- Lin, S.; Zhang, H.; Gao, Y.; Du, M.; Vai, M. The Effects of Muscle Stress on Signal Transmission in the Intra-Body Communication. In Proceedings of the 2016 IEEE International Conference on Consumer Electronics-China (ICCE-China), Guangzhou, China, 19–21 December 2016; pp. 1–3. [Google Scholar]
- Magaa, V.C.; Muoz-Organero, M. Reducing Stress on Habitual Journeys. In Proceedings of the 2015 IEEE 5th International Conference on Consumer Electronics - Berlin (ICCE-Berlin), Berlin, Germany, 6–9 September 2015; pp. 153–157. [Google Scholar]
- Ciabattoni, L.; Ferracuti, F.; Longhi, S.; Pepa, L.; Romeo, L.; Verdini, F. Real-Time Mental Stress Detection based on Smartwatch. In Proceedings of the 2017 IEEE International Conference on Consumer Electronics (ICCE), Las Vegas, NV, USA, 8–10 January 2017; pp. 110–111. [Google Scholar]
- Lawanot, W.; Inoue, M.; Yokemura, T.; Mongkolnam, P.; Nukoolkit, C. Daily Stress and Mood Recognition System Using Deep Learning and Fuzzy Clustering for Promoting Better Well-Being. In Proceedings of the 2019 IEEE International Conference on Consumer Electronics (ICCE), Las Vegas, NV, USA, 11–13 January 2019; pp. 1–6. [Google Scholar]
- Nath, R.K.; Thapliyal, H.; Caban-Holt, A. Validating Physiological Stress Detection Model Using Cortisol as Stress Bio Marker. In Proceedings of the 2020 IEEE International Conference on Consumer Electronics (ICCE), Las Vegas, NV, USA, 4–6 January 2020; pp. 1–5. [Google Scholar]
- Lee, J.-M.; Byun, W.; Keill, A.; Dinkel, D.; Seo, Y. Comparison of Wearable Trackers Ability to Estimate Sleep. Int. J. Environ. Res. Public Health 2018, 15, 1265. [Google Scholar] [CrossRef]
- Arnold, J.A.; Cheng, Y.; Baiani, Y.; Russell, A.M. Systems and Techniques for Tracking Sleep Consistency and Sleep Goals. US Patent 20 170 347 946A1, 2 June 2016. [Google Scholar]
- Karydis, A.M. Methods, Systems, and Apparatus for Self-Calibrating EEG Neurofeedback. US Patent 20 160 235 324A1, 15 February 2016. [Google Scholar]
- Sannholm, F.; Paalasmaa, J.; Leppakorpi, L. System for Determining the Quality of Sleep. US Patent 20 160 213 309A1, 31 December 2015. [Google Scholar]
- Bone, D.; Lee, C.; Chaspari, T.; Gibson, J.; Narayanan, S. Signal processing and machine learning for mental health research and clinical applications. IEEE Signal Process. Mag. 2017, 34, 196–195. [Google Scholar] [CrossRef]
- Osman, H.A.; Dong, H.; Saddik, A.E. Ubiquitous Biofeedback Serious Game for Stress Management. IEEE Access 2016, 4, 1274–1286. [Google Scholar] [CrossRef]
- Sano, A.; Picard, R.W. Stress Recognition Using Wearable Sensors and Mobile Phones. In Proceedings of the 2013 Humaine Association Conference on Affective Computing and Intelligent Interaction, Geneva, Switzerland, 2–5 September 2013; pp. 671–676. [Google Scholar]
- El-Samahy, E.; Mahfouf, M.; Torres-Salomao, L.A.; Anzurez-Marin, J. A New Computer Control System for Mental Stress Management using Fuzzy Logic. In Proceedings of the 2015 IEEE International Conference on Evolving and Adaptive Intelligent Systems (EAIS), Douai, France, 1–3 December 2015; pp. 1–7. [Google Scholar]
- Wijsman, J.; Grundlehner, B.; Liu, H.; Penders, J.; Hermens, H. Wearable Physiological Sensors Reflect Mental Stress State in Office-Like Situations. In Proceedings of the 2013 Humaine Association Conference on Affective Computing and Intelligent Interaction, Geneva, Switzerland, 2–5 September 2013; pp. 600–605. [Google Scholar]
- Choi, J.; Gutierrez-Osuna, R. Using Heart Rate Monitors to Detect Mental Stress. In Proceedings of the 2009 Sixth International Workshop on Wearable and Implantable Body Sensor Networks, Berkeley, CA, USA, 3–5 June 2009; pp. 219–223. [Google Scholar]
- Xu, T.; Cullen, K.R.; Houri, A.; Lim, K.O.; Schulz, S.C.; Parhi, K.K. Classification of Borderline Personality Disorder based on Spectral Power of Resting-State fMRI. In Proceedings of the 2014 36th Annual International Conference of the IEEE Engineering in Medicine and Biology Society, Chicago, IL, USA, 26–30 August 2014; pp. 5036–5039. [Google Scholar]
- Iqbal, T.; Redon-Lurbe, P.; Simpkin, A.J.; Elahi, A.; Ganly, S.; Wijns, W.; Shahzad, A. A sensitivity analysis of biophysiological responses of stress for wearable sensors in connected health. IEEE Access 2021, 9, 93567–93579. [Google Scholar] [CrossRef]
- Iqbal, T.; Elahi, A.; Redon, P.; Vazquez, P.; Wijns, W.; Shahzad, A. A review of biophysiological and biochemical indicators of stress for connected and preventive healthcare. Diagnostics 2021, 11, 556. [Google Scholar] [CrossRef] [PubMed]
- Sadad, T.; Bukhari, S.A.C.; Munir, A.; El-Sherbeeny, A.M.; Rauf, H.T.; Ghani, A. Detection of Cardiovascular Disease Based on PPG Signals Using Machine Learning with Cloud Computing. Comput. Intell. Neurosci. 2022, 2022, 1672677. [Google Scholar] [CrossRef] [PubMed]
- Winiarz, E. Endorphins, Endocannabinoids and Runners’ High. Sci. J. Lander Coll. Arts Sci. 2019, 13, 4. [Google Scholar]
- Wang, H.; Zhang, Y.-f.; Xu, L.-l.; Jiang, C.-m. Step rate-determined walking intensity and walking recommendation in Chinese young adults: A cross-sectional study. BMJ Open 2013, 3, e001801. [Google Scholar] [CrossRef] [PubMed]
- Schick, C.H. Pathophysiology of Hyperhidrosis. Thorac. Surg. Clin. 2016, 26, 389–393. [Google Scholar] [CrossRef] [PubMed]
- Madhuri, V.J.; Mohan, M.R.; Kaavya, R. Stress Management Using Artificial Intelligence. In Proceedings of the 2013 Third International Conference on Advances in Computing and Communications, Cochin, India, 29–31 August 2013; pp. 54–57. [Google Scholar]
- Giannakakis, G.; Grigoriadis, D.; Giannakaki, K.; Simantiraki, O.; Roniotis, A.; Tsiknakis, M. Review on Psychological Stress Detection Using Biosignals. IEEE Trans. Affect. Comput. 2022, 13, 440–460. [Google Scholar] [CrossRef]
- Zhao, Y.; Bergmann, J.H.M. Non-Contact Infrared Thermometers and Thermal Scanners for Human Body Temperature Monitoring: A Systematic Review. Sensors 2023, 23, 7439. [Google Scholar] [CrossRef] [PubMed]
- Akmandor, A.O.; Jha, N.K. Keep the Stress Away with SoDA: Stress Detection and Alleviation System. IEEE Trans. MultiScale Comput. Syst. 2017, 3, 269–282. [Google Scholar] [CrossRef]
- Aileni, R.M.; Valderrama, C.; Pasca, S.; Strungaru, R. Skin Conductance Analyzing in Function of the Bio-Signals Monitored by Biomedical Sensors. In Proceedings of the 2016 International Symposium on Fundamentals of Electrical Engineering (ISFEE), Bucharest, Romania, 30 June 2016–2 July 2016; pp. 1–4. [Google Scholar]
- Kaggle. Stress Level Detection. Available online: https://www.kaggle.com/datasets/laavanya/stress-level-detection (accessed on 15th May 2023).
- Liu, Y.; Wang, Y.; Zhang, J. New machine learning algorithm: Random forest. In Information Computing and Applications; Springer: Berlin/Heidelberg, Germany, 2012; pp. 246–252. [Google Scholar]
- Natekin, A.; Knoll, A. Gradient boosting machines, a tutorial. Front. Neurorobotics 2013, 7, 21. [Google Scholar] [CrossRef]
- Alyami, J.; Sadad, T.; Rehman, A.; Almutairi, F.; Saba, T.; Bahaj, S.A.; Alkhurim, A. Cloud computing-based framework for breast tumor image classification using fusion of AlexNet and GLCM texture features with ensemble multi-kernel support vector machine (MK-SVM). Comput. Intell. Neurosci. 2022, 2022, 7403302. [Google Scholar] [CrossRef]
Humidity | Temperature | Step Count | Stress Level |
---|---|---|---|
21.33 | 90.33 | 123 | 1 |
21.41 | 90.41 | 93 | 1 |
27.12 | 96.12 | 196 | 2 |
27.64 | 96.64 | 177 | 2 |
10.87 | 79.87 | 87 | 0 |
11.31 | 80.31 | 40 | 0 |
18.16 | 87.16 | 88 | 1 |
28.2 | 97.2 | 162 | 2 |
14.25 | 83.25 | 61 | 0 |
26.13 | 95.13 | 168 | 2 |
23.61 | 92.61 | 200 | 2 |
19.37 | 88.37 | 117 | 1 |
Measures | Definition |
---|---|
Accurate recognition of negative data | |
Accurate recognition of positive data | |
Incorrectly classifying negative data | |
Incorrectly classifying positive data |
Sample Size | Study Design | Level of Significance |
---|---|---|
2001 | Experimental design | 0.05 |
Accuracy | Precision | Recall | F1 Score |
---|---|---|---|
99.5 | 0.99 | 0.99 | 0.99 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Al-Atawi, A.A.; Alyahyan, S.; Alatawi, M.N.; Sadad, T.; Manzoor, T.; Farooq-i-Azam, M.; Khan, Z.H. Stress Monitoring Using Machine Learning, IoT and Wearable Sensors. Sensors 2023, 23, 8875. https://doi.org/10.3390/s23218875
Al-Atawi AA, Alyahyan S, Alatawi MN, Sadad T, Manzoor T, Farooq-i-Azam M, Khan ZH. Stress Monitoring Using Machine Learning, IoT and Wearable Sensors. Sensors. 2023; 23(21):8875. https://doi.org/10.3390/s23218875
Chicago/Turabian StyleAl-Atawi, Abdullah A., Saleh Alyahyan, Mohammed Naif Alatawi, Tariq Sadad, Tareq Manzoor, Muhammad Farooq-i-Azam, and Zeashan Hameed Khan. 2023. "Stress Monitoring Using Machine Learning, IoT and Wearable Sensors" Sensors 23, no. 21: 8875. https://doi.org/10.3390/s23218875