A Hyperparameter-Optimized LSTM Machine Learning Method for Predicting Air Quality
Abstract
Urban air pollution is a significant environmental concern that affects both the ecosystem and human health. In this paper, the authors propose a machine learning model for predicting the Air Quality Index (AQI). Various machine learning techniques are employed, including Linear Regression, Decision Tree, K-Nearest Neighbours (KNN), Random Forest, Gradient Boosting, XGBoost, and sequence modelling using Long Short-Term Memory (LSTM) networks for AQI prediction. The performance of these models is evaluated using key performance indicators such as Mean Absolute Error (MAE), Root Mean Square Error (RMSE), Mean Absolute Percentage Error (MAPE), and the coefficient of determination (R² score). The experimental results reveal that the XGBoost model outperforms the other models, while hyperparameter tuning further improves the effectiveness of both the Decision Tree and KNN models. The proposed system demonstrates high predictive performance with MAE: 14.637, RMSE: 30.698, MAPE: 9.355%, and R² Score: 0.948. In addition, a web interface for real-time AQI monitoring has been developed, making the proposed system useful for public awareness and environmental management.