Next Article in Journal
A Method for Constructing a Synthesis Health Index for Metro Vehicle Wheelsets
Next Article in Special Issue
Coupling Secret Sharing with Decentralized Server-Aided Encryption in Encrypted Deduplication
Previous Article in Journal
A New Chaotic Color Image Encryption Algorithm Based on Memristor Model and Random Hybrid Transforms
Previous Article in Special Issue
Semi-Supervised Training for (Pre-Stack) Seismic Data Analysis
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Integrating Environmental Data for Mental Health Monitoring: A Data-Driven IoT-Based Approach

1
Department of Computer Science and Software Engineering, Auckland University of Technology, Auckland 1010, New Zealand
2
School of Information Technology, Deakin University, Burwood, VIC 3125, Australia
*
Authors to whom correspondence should be addressed.
Appl. Sci. 2025, 15(2), 912; https://doi.org/10.3390/app15020912
Submission received: 20 December 2024 / Revised: 6 January 2025 / Accepted: 16 January 2025 / Published: 17 January 2025
(This article belongs to the Special Issue Application of Deep Learning and Big Data Processing)

Abstract

:
Mental health disorders constitute a significant global challenge, compounded by the limitations of traditional management approaches that rely heavily on subjective self-reports and infrequent professional evaluations. This study presents a groundbreaking IoT-based system that integrates big data analytics, fuzzy logic, and machine learning to revolutionise mental health monitoring. In contrast to existing solutions, the proposed system uniquely incorporates environmental factors, such as temperature and humidity in enclosed spaces—critical yet often overlooked contributors to emotional well-being. By leveraging IoT devices to collect and process large-scale ambient data, the system provides real-time classification and personalised visualisation tailored to individual sensitivity profiles. Preliminary results reveal high accuracy, scalability, and the potential to generate actionable insights, creating dynamic feedback loops for continuous improvement. This innovative approach bridges the gap between environmental conditions and mental healthcare, promoting a transformative shift from reactive to proactive care and laying the groundwork for predictive environmental health systems.

1. Introduction

Mental health disorders constitute a critical global health challenge, impacting millions of lives and imposing significant social and economic burdens. The World Health Organization (WHO) identifies mental health conditions such as anxiety, depression, and stress-related disorders as leading causes of disability worldwide [1]. Despite increasing awareness, existing mental health management strategies remain hindered by reliance on subjective self-reports and periodic professional evaluations [2], which often lack objectivity, immediacy, and accessibility. These shortcomings severely limit the delivery of effective, personalised interventions, particularly in resource-limited environments.

1.1. Mental Health and Environmental Factors

Recent advancements in emotional well-being monitoring systems have begun to address these challenges by utilising data-driven techniques to identify emotional states [3]. Many of these systems leverage wearable sensors, smartphones, and other digital platforms to gather physiological and behavioural data, offering insights into individuals’ mental health [4]. However, these solutions primarily focus on internal factors, such as heart rate variability and sleep patterns, while neglecting the impact of external environmental conditions, including temperature, humidity, air quality, and lighting. Research has shown that such environmental factors significantly influence emotional well-being and mental health, particularly in enclosed spaces where people spend a substantial portion of their time [5,6]. Ignoring these factors limits the comprehensiveness and efficacy of current monitoring solutions. Studies have shown that temperature, humidity, and other ambient factors can profoundly affect mental health [7]. However, they remain underutilised in treatment and prevention strategies.

1.2. The Role of Big Data and IoT in Mental Health Management

In this context, the Internet of Things (IoT) has emerged as a transformative technology capable of addressing mental health monitoring gaps. IoT devices equipped with environmental sensors can continuously collect vast amounts of real-time data, creating new opportunities for monitoring the interplay between environmental conditions and mental health. The application of IoT in health monitoring is increasingly prevalent, with several studies exploring its role in managing chronic conditions, sleep disorders, and stress levels [8,9,10]. When combined with big data analytics, fuzzy logic, and machine learning (ML) techniques, IoT systems can process and analyse these datasets to uncover meaningful patterns, provide actionable insights, and deliver personalised recommendations. With the proliferation of IoT devices, environmental data can now be collected continuously at an unprecedented scale. Big data analytics offers a powerful framework to process, analyse, and extract actionable insights from these data.
This paper proposes a novel IoT-based system for mental health monitoring that integrates these technologies to address critical shortcomings in traditional and emerging methods. The system aims to offer real-time classification, visualisation, and predictive analytics tailored to individual needs by capturing and analysing ambient environmental data alongside personal sensitivity profiles. The proposed approach enhances the accuracy and relevance of mental health monitoring. It fosters a shift from reactive to proactive care by enabling early detection of adverse conditions and their impact on emotional well-being.
This study aims to address the following questions:
  • How can big data and IoT technologies improve environmental monitoring for mental health management?
  • What predictive capabilities can be introduced to anticipate adverse conditions?
  • How can these predictions be personalised to account for individual sensitivities?
The remainder of this paper is organised as follows: Section 2 reviews related work in IoT-based mental health monitoring and the role of environmental factors. Section 3 outlines the design and architecture of the proposed system, detailing the integration of IoT devices, big data analytics, fuzzy logic, and machine learning. Section 4 presents initial experimental results, highlighting the system’s performance in terms of accuracy, scalability, and real-world applicability. Section 5 discusses the implications of the findings, including their potential to empower mental healthcare providers and individuals. Finally, Section 6 concludes the paper, summarising contributions and outlining directions for future research.

2. Related Work

2.1. Environmental Factors and Mental Health

Environmental factors play a significant role in influencing mental health outcomes. Various studies have highlighted the impact of physical surroundings, such as urban environments, pollution, noise, and climate change, on psychological well-being. Urbanisation, for instance, has been linked to increased stress levels and higher risks of anxiety and depression due to factors like overcrowding, lack of green spaces, and heightened exposure to noise pollution [11,12]. Air pollution, particularly exposure to fine particulate matter (PM2.5), has been associated with cognitive decline and the exacerbation of psychiatric disorders [13]. Similarly, natural disasters and extreme weather events, which are intensifying due to climate change, have been shown to contribute to post-traumatic stress disorder (PTSD), depression, and anxiety disorders [14].
Understanding these relationships underscores the need for interdisciplinary approaches combining public health, environmental science, and urban planning to address the mental health challenges associated with environmental factors.

2.2. Recent Advancements in Predictive Modelling

Recent advancements in predictive modelling have significantly contributed to environmental monitoring and mental health fields. Among these, two of the most notable developments are the application of cognitive computing to predict the flow status of flexible rectifiers and the predictive modeling of flexible electrohydrodynamic (EHD) pumps using Kolmogorov–Arnold Networks (KAN).
The first advancement leverages cognitive models to enhance the accuracy of stress prediction systems by integrating environmental and physiological data. Peng et al. [15] explore this methodology, demonstrating its potential in adaptive stress detection systems.
The second advancement involves the use of KAN, which employs learnable spline-based activation functions to model complex nonlinear relationships. This approach offers improved predictive accuracy over traditional models. Peng et al. [16] highlight KAN’s effectiveness in capturing intricate interactions between environmental factors and individual responses, which can be applied to refine stress detection models for better precision in predicting mental health outcomes.
These advancements underscore the growing role of intelligent, flexible systems in enhancing prediction accuracy within uncertain and dynamic environments, with promising applications in mental health prediction and stress detection.

2.3. Big Data in Healthcare

The integration of big data analytics in healthcare has transformed the way medical professionals diagnose, treat, and manage diseases. With the proliferation of electronic health records (EHRs), wearable devices, and other health-related technologies, an unprecedented volume of data are now available for analysis [17]. Big data enable the identification of patterns and trends in patient populations, facilitating predictive analytics and personalised medicine. For example, machine learning algorithms can analyse large datasets to predict disease outbreaks, optimise treatment plans, and improve patient outcomes [18].
However, challenges such as data privacy, interoperability, and the need for advanced computational infrastructure must be addressed to fully harness the potential of big data in healthcare. As the field evolves, ethical considerations surrounding the use of patient data and the potential for algorithmic bias remain critical areas of focus [19].

2.4. Fuzzy Logic in Environmental Data Analysis

Fuzzy logic, a mathematical approach based on degrees of truth rather than binary logic, has emerged as a powerful tool for analysing complex and uncertain environmental data. Environmental systems often involve intricate interdependencies and imprecise information, making traditional analytical methods less effective [20]. Fuzzy logic provides a framework for dealing with such uncertainties, enabling researchers to model complex environmental phenomena more accurately. Applications of fuzzy logic in environmental data analysis include air quality monitoring, climate change modelling, and disaster risk assessment. For instance, fuzzy logic systems can evaluate air quality indices by integrating multiple parameters, such as pollutant concentrations, humidity, and temperature, to produce comprehensive assessments [21].
The adaptability of fuzzy logic allows for the incorporation of expert knowledge and subjective judgments, making it particularly useful for decision-making in environmental management. Despite its advantages, the implementation of fuzzy logic requires careful design and validation to ensure reliability and accuracy. As environmental challenges become increasingly complex, the role of fuzzy logic in providing actionable insights is expected to grow significantly.

3. Methodology

This section outlines the methodology employed in the proposed IoT-based mental health monitoring system, which leverages big data, machine learning, and environmental sensors to monitor temperature and humidity levels in enclosed settings for managing the mental health status of residents. The system’s objective is to identify correlations between environmental parameters (specifically temperature and humidity) and emotional states (particularly stress level), as well as to develop predictive models for early intervention.

3.1. Datasets

For this study, three publicly available datasets containing temperature and humidity measurements from enclosed environments were selected. These datasets were chosen because they offer a variety of environmental conditions and span multiple settings, providing a diverse range of data points for analysis.
  • Correlating Indoor and Outdoor Temperature and Humidity in a Sample of Buildings in Tropical Climates [22]—This dataset includes absolute humidity, relative humidity, and temperature measurements for indoor and outdoor environments across 35 buildings in eight tropical cities. We extracted Tmp and RH data from each building to create a consolidated dataset, referred to as dataset1, for our subsequent analyses.
  • Indoor Temperature and Relative Humidity Dataset [23]—This dataset comprises indoor temperature and relative humidity measurements collected over a month using twelve Xiaomi Mijia sensors in Medellín, Colombia. We consolidated all sensor data into dataset2 for further analysis.
  • Temperature and Humidity Dataset [24]—This dataset includes temperature and humidity measurements for three regions, including Shenyang, Beijing, and Guangzhou. The data from all three cities have been combined into dataset3 for subsequent analysis.
Each dataset contains time-stamped records of temperature and humidity levels, which were merged into a unified database for analysis. The primary objective was to analyse the relationship between these environmental variables and the emotional well-being of individuals within these environments.

3.2. Data Collection and Preprocessing

Data were collected using IoT-enabled devices, including temperature and humidity sensors, which transmitted real-time readings to central servers. These IoT devices were distributed across the environments. They collected data at different intervals depending on the dataset, as described in Section 3.1.
Environmental factors, particularly temperature and humidity, significantly influence emotional well-being and stress levels. Extreme temperatures and high humidity have been linked to increased stress, discomfort, and negative emotional states, while moderate conditions are generally more conducive to emotional balance and reduced stress [25]. Research indicates that high temperatures can negatively affect mental health, leading to increased hospitalisation for mental illness [26]. Moreover, high humidity levels, particularly when combined with elevated temperatures, can exacerbate stress and discomfort [27]. Conversely, moderate temperatures and humidity levels are associated with better emotional well-being and reduced stress [28]. On the other hand, exposure to cold temperatures can lead to increased stress and negative mental health outcomes. For instance, individuals living in cold homes are at a higher risk of severe mental distress [29].
High humidity levels, particularly when combined with elevated temperatures, can exacerbate stress and discomfort. Florido et al. [30] found that relative humidity showed a significant correlation with suicide rates, indicating that both temperature and humidity are important factors in mental health.
Based on findings from prior studies, the relationship between temperature, humidity, and stress levels can be systematically analysed and categorised into distinct categories, as outlined in Table 1. These categories provide a structured framework for associating environmental conditions with stress levels, serving as a foundation for real-time stress monitoring and personalised mental health interventions. The thresholds used for categorising stress levels were informed by a combination of empirical studies and domain-specific knowledge.
These thresholds represent general boundaries derived from aggregated data, highlighting typical stress responses to specific temperature and humidity levels. However, it is crucial to recognise that these categories may require personalisation to accurately reflect individual experiences and environmental contexts. Factors such as acclimatisation to local climates, cultural variations in comfort levels, and individual health conditions significantly influence how environmental factors impact stress and emotional well-being. Future implementations of these categorisations should consider adaptive mechanisms to fine-tune thresholds based on personal and contextual variables, ensuring more accurate and meaningful assessments.
The preprocessing steps involved the following:
  • Data Cleaning: Missing data points were handled by using interpolation methods based on surrounding values. Outliers were detected using z-scores and were removed if they deviated significantly from the rest of the dataset.
  • Normalisation: Temperature and humidity readings were normalised to a standard scale to ensure uniformity and improve the performance of machine learning models.
  • Data Labelling: Emotional states were labelled based on the literature, as mentioned above. This labelling helped establish the ground truth for training the machine learning models.

3.3. Machine Learning and Big Data Integration

Given the volume and complexity of the data from three different datasets mentioned in Section 3.1, we used big data tools for distributed data processing and machine learning. The following steps were undertaken:
  • Data Processing: The data were processed using standard machine learning and deep learning techniques in Python. The datasets were loaded using pandas and then cleaned and preprocessed through normalisation and feature scaling. We applied z-score normalisation to temperature and humidity values and handled missing data through interpolation. The final dataset was then labelled based on predefined stress levels derived from temperature and humidity conditions. Models were trained and evaluated on a 70–30% split for training and testing data.
  • Feature Selection: A combination of statistical analysis and domain knowledge was used to identify the most relevant features for predicting emotional states. The selected features included temperature (T), humidity (RH), and historical temperature and humidity values, which were used to classify stress levels into five categories: very low, low, medium, high, and very high.
  • Model Training: Several machine learning algorithms were implemented, including:
    • Logistic Regression (LR): LR was chosen as a baseline model due to its simplicity, interpretability, and efficiency for binary and multi-class classification tasks. It is particularly effective for datasets where the relationship between features (temperature and humidity) and the target (stress levels) is approximately linear, making it a natural choice for initial model comparison.
    • Support Vector Machines (SVM): SVM was selected for its ability to perform well in high-dimensional spaces and its robustness in handling both linear and non-linear decision boundaries. The Radial Basis Function (RBF) kernel was used to capture the complex relationships between temperature, humidity, and stress levels, especially when the data are not linearly separable. This makes SVM a powerful tool for classification problems where accuracy is critical.
    • Long Short-Term Memory (LSTM) Networks: LSTM was chosen to model the sequential dependencies between historical temperature and humidity values. As a type of Recurrent Neural Network (RNN), LSTM is designed to capture long-term dependencies, which is critical for predicting stress levels based on time-series data. This ability to account for temporal patterns makes LSTM ideal for scenarios where emotional states may evolve over time, driven by the continuous fluctuations in temperature and humidity.
    Each model was trained using a 70–30% split for training and testing data. We performed hyperparameter tuning for each algorithm using grid search and cross-validation to optimise model performance.
  • Model Evaluation: The models were evaluated using various performance metrics, including accuracy, precision, recall, and F1 score. We also assessed the ability of each model to predict stress levels based on historical temperature and humidity values, simulating a 30 min prediction window to enable early intervention in real-world scenarios.

3.4. System Architecture

This system is designed to enable continuous environmental data collection and real-time analysis for stress level prediction. The system architecture is illustrated in Figure 1, which provides a detailed representation of the integration between data collection, processing, and predictive analysis.
The system comprises the following key components:
  • IoT Devices: These devices are equipped with sensors to continuously monitor temperature and humidity levels, which are critical environmental factors influencing emotional states. The real-time data collected by these sensors form the foundation for predicting stress levels by capturing fluctuations in environmental conditions.
  • Data Collection and Processing Platform: This platform handles the acquisition and preprocessing of sensor data using Python libraries such as pandas and NumPy. The preprocessing workflow includes addressing missing values, normalising temperature and humidity, and calculating z-scores to standardise the data. This ensures the data are clean and ready for machine learning model training and real-time predictions.
  • Data Processing and Machine Learning Framework: The processed data are utilised to train and evaluate multiple machine learning models, including Logistic Regression (LR), Support Vector Machines (SVM), and Long Short-Term Memory (LSTM) networks. Training is performed using a 70–30% train–test data split, with hyperparameter tuning applied to optimise model performance. These models are rigorously evaluated using metrics such as accuracy, precision, recall, and F1 score to ensure dependable predictions of stress levels.
  • Model Deployment: The trained machine learning models are deployed to provide real-time predictions of emotional states based on live environmental data. The models categorise stress levels into five predefined categories, enabling dynamic assessment of a user’s emotional well-being in response to current temperature and humidity conditions.

4. Results and Experiment

This section presents the experimental results based on the three datasets, focusing on the analysis of temperature and humidity levels in enclosed environments and their relationship with emotional states. The following experiments evaluate the effectiveness of the proposed system using three machine learning models: Logistic Regression (LR), Support Vector Machine (SVM), and Long Short-Term Memory (LSTM).

4.1. Performance of Machine Learning Models

Table 2 provides a comprehensive summary of the performance of three machine learning models—Logistic Regression (LR), Support Vector Machines (SVM), and Long Short-Term Memory (LSTM) networks—in classifying stress levels based on environmental data. The evaluation metrics include accuracy, precision, recall, and F1 score, offering a detailed assessment of each model’s effectiveness.
The results highlight that the SVM model outperformed the others, achieving the highest accuracy (97.95%) and demonstrating balanced performance across all metrics. The Logistic Regression (LR) model also performed well, with a slightly lower accuracy of 96.95%. In contrast, the LSTM model showed moderate performance, with an accuracy of 70.03% but significantly lower precision (49%), likely due to the limited size of the training dataset and a lack of diverse temporal patterns in the environmental data. These findings suggest that while SVM is the most suitable for stress level classification in this context, the LSTM model’s performance may be improved with further optimisation, such as hyperparameter tuning (e.g., adjusting learning rate, number of layers, and units per layer) and by using a more suitable dataset with stronger temporal dependencies. In addition, the lack of diverse temporal features in the dataset may have limited LSTM’s ability to capture important patterns, potentially limiting its ability to improve prediction accuracy. This insight opens avenues for future work, where temporal models like LSTM might perform better with more data or refined feature engineering.

4.2. Predictive Accuracy

Figure 2 illustrates a comparative analysis of the predictive accuracy of the three machine learning models—Logistic Regression (LR), Support Vector Machines (SVM), and Long Short-Term Memory (LSTM) networks—based on their classification results. The chart highlights that the SVM model consistently outperformed LR and LSTM across all evaluation metrics, including precision, recall, and F1 score. This visual comparison validates the robustness and reliability of the SVM model for classifying stress levels using static environmental data.
Each model’s performance was further analysed using confusion matrices for the five stress level categories: Very Low, Low, Medium, High, and Very High. These matrices provided detailed insights into the models’ classification capabilities and highlighted areas for potential improvement. The following subsections discuss the key findings from this evaluation in detail, focusing on each model’s strengths and limitations in addressing the classification task.

4.3. Class Imbalance and Model Performance

Figure 3, Figure 4 and Figure 5 illustrate the impact of class imbalance on the performance of the Logistic Regression (LR), Support Vector Machine (SVM), and Long Short-Term Memory (LSTM) models. The dataset is dominated by the “Very Low” and “Very High” classes, which skew model performance towards these categories. While all models demonstrate high accuracy for the “Very Low” class, their ability to correctly classify the “Low”, “Medium”, and “High” classes is significantly limited.

4.3.1. Logistic Regression

As shown in Figure 3, the strengths and weaknesses of the LR model are as follows:
  • Strengths: The LR model correctly predicts 113,195 instances for the “Very Low” class and 6621 instances for the “Very High” class, showcasing its strong performance on the dominant classes.
  • Weaknesses: The model struggles with mid-range classes, misclassifying 625 instances of “Very High” as “Very Low” and 124 instances of “Very Low” as “Very High”. This indicates limited capacity to differentiate between these mid-range stress levels.

4.3.2. Support Vector Machine

As depicted in Figure 4, the SVM model exhibits the following strengths and weaknesses:
  • Strengths: SVM improves predictions for the “Very High” class with 7166 correct predictions. It also demonstrates marginal improvement over LR in identifying “Low” (16 correct predictions) and “Medium” (6 correct predictions) classes.
  • Weaknesses: Despite improvements, the SVM model misclassifies the majority of “Medium” and “High” instances as “Very Low”, highlighting its difficulty with underrepresented classes.

4.3.3. Long Short-Term Memory

Figure 5 shows the strengths and weaknesses of the LSTM model:
  • Strengths: LSTM achieves comparable results to SVM and LR for the “Very Low” class, with 113,329 correct predictions. It also performs the best among the three models for the “Very High” class, achieving 7246 correct predictions.
  • Weaknesses: The LSTM model fails to predict any instances of the “Low”, “Medium”, and “High” classes, misclassifying them all as “Very Low”. This suggests significant overfitting to dominant class patterns, likely due to insufficient representation of minority classes in the training data.

4.3.4. Comparative Insights

Across all three models (Figure 3, Figure 4 and Figure 5), the significant class imbalance skews predictions heavily towards the “Very Low” and “Very High” categories:
  • SVM (Figure 4) demonstrates slightly better performance for the “Low” and “Medium” classes compared to LR and LSTM.
  • LSTM (Figure 5) outperforms both LR and SVM for the “Very High” class but performs poorly for mid-range classes due to overfitting.
These findings highlight the need for techniques to address class imbalance, such as oversampling minority classes or employing advanced cost-sensitive learning methods to improve classification performance for underrepresented categories.

5. Discussion

This study investigated the integration of IoT technology with machine learning models to classify stress levels based on environmental factors, specifically temperature and humidity. The results highlighted the effectiveness of various machine learning approaches, focusing on Logistic Regression (LR), Support Vector Machine (SVM), and Long Short-Term Memory (LSTM) networks. Fuzzy logic was also employed to enhance the classification process, particularly in dealing with the inherent uncertainty and variability in the environmental data. This section discusses the implications of these findings, the limitations of the proposed methodology, and potential avenues for future work.

5.1. Analysis of Model Performance

The comparative evaluation of LR, SVM, and LSTM models provided critical insights into their performance. LR and SVM demonstrated high accuracy and precision, making them well-suited for scenarios where computational efficiency and reliability are essential. However, their limitations in capturing temporal dependencies in environmental data were evident.
The LSTM model, which is designed to leverage sequential data, showed moderate performance relative to LR and SVM. While it excelled in identifying temporal trends and fluctuations, its overall accuracy and F1 score were comparatively lower. This discrepancy may stem from the limited size of the training dataset or suboptimal hyperparameter configurations. Nevertheless, the LSTM’s capacity to forecast stress-inducing conditions highlights its potential for real-time applications requiring predictive capabilities.

5.2. Impact of Environmental Factors

The analysis revealed a strong correlation between environmental factors—temperature, humidity—and stress levels. These findings align with existing research, confirming that elevated temperatures and humidity levels are associated with higher stress. The thresholds identified for temperature and humidity provide actionable insights for designing interventions, particularly in enclosed environments such as offices and homes. These results underscore the importance of addressing environmental conditions as a critical factor in emotional well-being.

5.3. Limitations

Several limitations of this study must be acknowledged. Firstly, the dataset was specific to tropical cities, which may limit the generalisability of the findings to other climates and populations. Expanding the dataset to include a broader range of environmental conditions and user demographics could improve the robustness and applicability of the models.
Secondly, while the models effectively classified stress levels, relying solely on temperature and humidity as predictors may oversimplify the complex nature of stress. Incorporating additional variables, such as air quality, noise levels, or physiological data (e.g., heart rate), could provide a more holistic understanding of emotional states.
Lastly, labelling stress levels based on predefined thresholds for temperature and humidity may not account for individual differences in stress responses. Future work should explore personalised models that adapt to users’ unique sensitivities to environmental factors, enhancing the system’s relevance and accuracy.

6. Conclusions

This study demonstrated the potential of integrating IoT and machine learning technologies for stress classification using environmental data. LR and SVM models were shown to be effective for classification tasks, while the LSTM model exhibited promise for predictive applications. Despite certain limitations, the findings lay the groundwork for the development of advanced stress monitoring systems that leverage real-time environmental data. By addressing the identified challenges and exploring proposed future directions, this work has the potential to significantly enhance human well-being in smart environments.

Future Directions

Building on the current findings, several avenues for future research and development are recommended:
  • Dataset Expansion: Collecting larger datasets from diverse environments and populations will enhance model accuracy and generalisability.
  • Feature Augmentation: Expanding input features to include physiological signals, activity data, or contextual information will provide a more comprehensive understanding of stress factors.
  • Edge Device Deployment: Developing lightweight versions of the models for deployment on edge devices can enable real-time stress monitoring and feedback in resource-constrained settings.
  • Adaptive Models: Designing adaptive models that learn individual users’ stress responses over time can improve the system’s personalisation and accuracy.
  • Integrated Intervention Systems: Combining stress monitoring with intervention mechanisms, such as environmental adjustments or relaxation prompts, can create a holistic stress management solution.
  • Data Augmentation and Class Imbalance Mitigation: Addressing the challenge of class imbalance in stress detection systems, and incorporating techniques such as oversampling, synthetic data generation, or cost-sensitive learning to create more robust models, can improve performance and fairness, especially when dealing with underrepresented stress levels in the data.
These directions aim to refine the system and broaden its applicability, ensuring a more impactful contribution to the field of stress management and mental well-being.

Author Contributions

S.Z.: Conceptualization, methodology, software, validation, formal analysis, investigation, resources, data curation, writing—original draft preparation, visualization. M.N.: Conceptualization, methodology, validation, formal analysis, writing—review and editing, supervision, project administration. R.S.: Validation, formal analysis, writing—review and editing, supervision, project administration. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The data presented in this study are available on request from the corresponding author. The data are not publicly available due to the code being long and complex, which requires careful handling and documentation to ensure proper usage.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Mental Disorders. Available online: https://www.who.int/news-room/fact-sheets/detail/mental-disorders (accessed on 18 December 2024).
  2. Bauhoff, S. Self-report bias in estimating cross-sectional and treatment effects. In Encyclopedia of Quality of Life and Well-Being Research; Springer: Berlin/Heidelberg, Germany, 2024; pp. 6277–6279. [Google Scholar]
  3. Sükei, E.; Norbury, A.; Perez-Rodriguez, M.M.; Olmos, P.M.; Artés, A. Predicting emotional states using behavioral markers derived from passively sensed data: Data-driven machine learning approach. JMIR mHealth uHealth 2021, 10, e24465. [Google Scholar] [CrossRef] [PubMed]
  4. Houben, M.; Van Den Noortgate, W.; Kuppens, P. The relation between short-term emotion dynamics and psychological well-being: A meta-analysis. Psychol. Bull. 2015, 141, 901. [Google Scholar] [CrossRef] [PubMed]
  5. Cantuaria, M.; Brandt, J.; Blanes-Vidal, V. Exposure to multiple environmental stressors, emotional and physical well-being, and self-rated health: An analysis of relationships using latent variable structural equation modelling. Environ. Res. 2023, 227, 115770. [Google Scholar] [CrossRef] [PubMed]
  6. Hawkins, G.T.; Chung, C.S.; Hertz, M.F.; Antolin, N. The school environment and physical and social-emotional well-being: Implications for students and school employees. J. Sch. Health 2023, 93, 799–812. [Google Scholar] [CrossRef]
  7. Fretes, G.; Llurba, C.; Palau, R. Exploring classroom temperature and humidity on students’ emotions through IoT and image processing. J. Infrastruct. Policy Dev. 2024, 8, 3808. [Google Scholar] [CrossRef]
  8. Dadkhah, M.; Mehraeen, M.; Rahimnia, F.; Kimiafar, K. Use of internet of things for chronic disease management: An overview. J. Med. Signals Sens. 2021, 11, 138–157. [Google Scholar] [CrossRef]
  9. Talpur, M.S.H.; Abro, A.A.; Ebrahim, M.; Kandhro, I.A.; Manickam, S.; Arfeen, S.U.; Dandoush, S.; Uddin, M. Illuminating Healthcare Management: A Comprehensive Review of IoT-Enabled Chronic Disease Monitoring. IEEE Access 2024, 12, 1. [Google Scholar] [CrossRef]
  10. 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]
  11. World Health Organization. Urban Green Spaces and Health; WHO/EURO: 2016-3352-43111-60341; World Health Organization, Regional Office for Europe: Copenhagen, Denmark, 2016. [Google Scholar]
  12. Moore, T.; Kesten, J.M.; López-López, J.A.; Ijaz, S.; McAleenan, A.; Richards, A.; Gray, S.; Savović, J.; Audrey, S. The effects of changes to the built environment on the mental health and well-being of adults: Systematic review. Health Place 2018, 53, 237–257. [Google Scholar] [CrossRef]
  13. Liu, X.; Huang, J.; Song, C.; Zhang, T.L.; Liu, Y.P.; Yu, L. Neurodevelopmental toxicity induced by PM2. 5 Exposure and its possible role in Neurodegenerative and mental disorders. Hum. Exp. Toxicol. 2023, 42, 9603271231191436. [Google Scholar] [CrossRef]
  14. Cianconi, P.; Betrò, S.; Janiri, L. The impact of climate change on mental health: A systematic descriptive review. Front. Psychiatry 2020, 11, 490206. [Google Scholar] [CrossRef] [PubMed]
  15. Peng, Y.; Yang, X.; Li, D.; Ma, Z.; Liu, Z.; Bai, X.; Mao, Z. Predicting flow status of a flexible rectifier using cognitive computing. Expert Syst. Appl. 2025, 264, 125878. [Google Scholar] [CrossRef]
  16. Peng, Y.; He, M.; Hu, F.; Mao, Z.; Huang, X.; Ding, J. Predictive Modeling of Flexible EHD Pumps using Kolmogorov-Arnold Networks. Biomim. Intell. Robot. 2024, 4, 100184. [Google Scholar] [CrossRef]
  17. Reddy, S.; Fox, J.; Purohit, M.P. Artificial intelligence-enabled healthcare delivery. J. R. Soc. Med. 2019, 112, 22–28. [Google Scholar] [CrossRef]
  18. Esteva, A.; Robicquet, A.; Ramsundar, B.; Kuleshov, V.; DePristo, M.; Chou, K.; Cui, C.; Corrado, G.; Thrun, S.; Dean, J. A guide to deep learning in healthcare. Nat. Med. 2019, 25, 24–29. [Google Scholar] [CrossRef]
  19. Jayatilake, S.M.D.A.C.; Ganegoda, G.U. Involvement of machine learning tools in healthcare decision making. J. Healthc. Eng. 2021, 2021, 6679512. [Google Scholar] [CrossRef]
  20. Gray, S.A.; Gray, S.; Cox, L.J.; Henly-Shepard, S. Mental modeler: A fuzzy-logic cognitive mapping modeling tool for adaptive environmental management. In Proceedings of the 46th Hawaii International Conference on System Sciences, Wailea, HI, USA, 7–10 January 2013; pp. 965–973. [Google Scholar]
  21. Rao, C.V.; Reddy, M.S.; Kishore, J.; Sirisha, R.P.; Rao, B.S.S.; Killamsetti, H. Optimizing Indoor Air Quality: A Fuzzy Logic-based Control System. In Proceedings of the 2nd International Conference on Automation, Computing and Renewable Systems (ICACRS), Pudukkottai, India, 11–13 December 2023; pp. 1053–1057. [Google Scholar]
  22. Pan, J.; Tang, M.; Caniza, J.-M.; H’eraud, E.; Koay, H.K.; Lee, C.K.; Lee, Y.; Li, A.N.; Ruiz, C.; Santillan-Salas, F.; et al. Correlating Indoor and Outdoor Temperature and Humidity in a Sample of Buildings in Tropical Climates. Indoor Air 2021, 31, 2281–2295. [Google Scholar] [CrossRef]
  23. Botero-Valencia, J.; Castano-Londono, L.; Marquez-Viloria, D. Indoor temperature and relative humidity dataset of controlled and uncontrolled environments. Data 2022, 7, 81. [Google Scholar] [CrossRef]
  24. Kong, J.L.; Fan, X.M.; Jin, X.B.; Su, T.L.; Bai, Y.T.; Ma, H.J.; Zuo, M. BMAE-Net: A data-driven weather prediction network for smart agriculture. Agronomy 2023, 13, 625. [Google Scholar] [CrossRef]
  25. Extreme Heat Can Take a Toll on Mental Health. Available online: https://www.psychiatry.org/news-room/apa-blogs/extreme-heat-can-take-a-toll-on-mental-health (accessed on 18 December 2024).
  26. Bundo, M.; Preisig, M.; Merikangas, K.; Glaus, J.; Vaucher, J.; Waeber, G.; Marques-Vidal, P.; Strippoli, M.-P.F.; Müller, P.; Vicedo-Cabrera, A.M.; et al. How ambient temperature affects mood: An ecological momentary assessment study in Switzerland. Environ. Health 2023, 22, 52. [Google Scholar] [CrossRef]
  27. Rony, M.K.K.; Alamgir, H.M. High temperatures on mental health: Recognizing the association and the need for proactive strategies—A perspective. Health Sci. Rep. 2023, 6, e1729. [Google Scholar] [CrossRef] [PubMed]
  28. Noelke, C.; McGovern, M.; Corsi, D.J.; Jimenez, M.P.; Stern, A.; Wing, I.S.; Berkman, L. Increasing ambient temperature reduces emotional well-being. Environ. Res. 2016, 151, 124–129. [Google Scholar] [CrossRef] [PubMed]
  29. Unaffordable Home Heating Increases Risk of Severe Mental Distress. Available online: https://www.phcc.org.nz/briefing/unaffordable-home-heating-increases-risk-severe-mental-distress (accessed on 20 December 2024).
  30. Florido Ngu, F.; Kelman, I.; Chambers, J.; Ayeb-Karlsson, S. Correlating heatwaves and relative humidity with suicide (fatal intentional self-harm). Sci. Rep. 2021, 11, 22175. [Google Scholar] [CrossRef] [PubMed]
Figure 1. System Architecture: A comprehensive framework integrating IoT devices, data processing platforms, and machine learning models for real-time stress monitoring and prediction.
Figure 1. System Architecture: A comprehensive framework integrating IoT devices, data processing platforms, and machine learning models for real-time stress monitoring and prediction.
Applsci 15 00912 g001
Figure 2. Comparison of Precision, Recall, and F1 Score Across Machine Learning Models: SVM Outperforms LR and LSTM in Handling Static Environmental Data.
Figure 2. Comparison of Precision, Recall, and F1 Score Across Machine Learning Models: SVM Outperforms LR and LSTM in Handling Static Environmental Data.
Applsci 15 00912 g002
Figure 3. Confusion Matrix for Logistic Regression (LR): The model performs well for dominant classes but struggles with mid-range categories.
Figure 3. Confusion Matrix for Logistic Regression (LR): The model performs well for dominant classes but struggles with mid-range categories.
Applsci 15 00912 g003
Figure 4. Confusion Matrix for Support Vector Machine (SVM): The model shows improved accuracy for “Very High” and slight improvements for “Low” and “Medium” classes.
Figure 4. Confusion Matrix for Support Vector Machine (SVM): The model shows improved accuracy for “Very High” and slight improvements for “Low” and “Medium” classes.
Applsci 15 00912 g004
Figure 5. Confusion Matrix for Long Short-Term Memory (LSTM): The model excels in predicting “Very High” but fails entirely for “Low”, “Medium”, and “High” classes.
Figure 5. Confusion Matrix for Long Short-Term Memory (LSTM): The model excels in predicting “Very High” but fails entirely for “Low”, “Medium”, and “High” classes.
Applsci 15 00912 g005
Table 1. Categorisation of Stress Levels Based on Temperature and Humidity.
Table 1. Categorisation of Stress Levels Based on Temperature and Humidity.
Stress LevelTemperature RangeHumidity Range
Very HighBelow −20 °C or above 30 °CAbove 80%
HighBelow −10 °C or 31 °C to 35 °C70% to 80%
Medium−10 °C to −1 °C or 26 °C to 30 °C50% to 70%
Low0 °C to 15 °C30% to 50%
Very Low16 °C to 25 °C40% to 60%
Table 2. Performance Metrics of Machine Learning Models for Stress Level Classification.
Table 2. Performance Metrics of Machine Learning Models for Stress Level Classification.
ModelAccuracy (%)Precision (%)Recall (%)F1 Score (%)
LR96.0494.3496.0495.18
SVM97.9596.2297.9597.07
LSTM70.0349.0070.0356.65
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.

Share and Cite

MDPI and ACS Style

Zamani, S.; Nguyen, M.; Sinha, R. Integrating Environmental Data for Mental Health Monitoring: A Data-Driven IoT-Based Approach. Appl. Sci. 2025, 15, 912. https://doi.org/10.3390/app15020912

AMA Style

Zamani S, Nguyen M, Sinha R. Integrating Environmental Data for Mental Health Monitoring: A Data-Driven IoT-Based Approach. Applied Sciences. 2025; 15(2):912. https://doi.org/10.3390/app15020912

Chicago/Turabian Style

Zamani, Sanaz, Minh Nguyen, and Roopak Sinha. 2025. "Integrating Environmental Data for Mental Health Monitoring: A Data-Driven IoT-Based Approach" Applied Sciences 15, no. 2: 912. https://doi.org/10.3390/app15020912

APA Style

Zamani, S., Nguyen, M., & Sinha, R. (2025). Integrating Environmental Data for Mental Health Monitoring: A Data-Driven IoT-Based Approach. Applied Sciences, 15(2), 912. https://doi.org/10.3390/app15020912

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop