Optimizing Environmental Sensor Data for Predicting Temperature and Humidity Modification of LSTM Models

18 July 2025, Version 1
This content is an early or alternative research output and has not been peer-reviewed by Cambridge University Press at the time of posting.

Abstract

Extreme heat has become an increasingly severe issue in many urban areas, with local governments struggling to predict heat events accurately using existing satellite-based or institutional systems. This study investigates whether a cost-effective sensor network—consisting of DHT22 sensors connected to ESP32 microcontrollers—can be used to collect real-time data to accurately predict localized heat distributions using Long Short-Term Memory (LSTM) models. Data was collected over a two-day period from three sensor stations arranged in a triangular formation in Upland, California. Each station stored data locally on an SD card, while additional vegetation and color information was recorded using an iOS application to provide supplementary context, though not used directly in the prediction model. The resulting time series dataset included temperature, humidity, and NDVI data, which were used to train and evaluate three models: LSTM, Linear Regression, and Decision Tree Regressor. Performance was assessed using Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and R² score. The LSTM model demonstrated the highest predictive accuracy, achieving a lower MAE and RMSE across all three sensor locations. This research supports the feasibility of deploying low-cost, decentralized sensor networks to generate localized and reliable heat forecasts. It also confirms that LSTM models can outperform traditional regression techniques when fed sensor-based environmental data. The project demonstrates a scalable and accessible solution for communities and researchers seeking real-time heat prediction systems without reliance on expensive institutional infrastructure.

Keywords

LSTM
LSTM Models
Optimization
Temperature
Humidity
Intelligient Prediction
Low-Cost Sensor Network
ESP32
DHT11
Environment
Environmental Monitoring
Decentralized Environmental Monitoring
LSTM Optimization
Sensor Triangulation
SD Card

Comments

Comments are not moderated before they are posted, but they can be removed by the site moderators if they are found to be in contravention of our Commenting and Discussion Policy [opens in a new tab] - please read this policy before you post. Comments should be used for scholarly discussion of the content in question. You can find more information about how to use the commenting feature here [opens in a new tab] .
This site is protected by reCAPTCHA and the Google Privacy Policy [opens in a new tab] and Terms of Service [opens in a new tab] apply.