Stacking Ensemble Learning and SHAP-Based Insights for Urban Air Quality Forecasting: Evidence from Shenyang and Global Implications
Zhaoxin Xu, Huajian Zhang, Aiguo Zhai, Chunyu Kong, Jinping Zhang
Abstract
Air pollution poses a significant global challenge, impacting human health and environmental sustainability worldwide. Accurate air quality forecasting is essential for effective mitigation strategies, particularly in rapidly urbanizing regions. This study focuses on Shenyang, China, as a representative case to analyze air quality dynamics and develop a high-precision forecasting tool. Using a comprehensive six-year dataset (2020–2025) of daily air quality and meteorological measurements, a rigorous preprocessing pipeline was applied to ensure data integrity. Five gradient-boosted decision-tree models were trained and combined through a ridge-regularized stacking ensemble to enhance the predictive accuracy. The ensemble achieved an R2 of 94.17% and a mean absolute percentage error of 7.79%, outperforming individual models. The feature importance analysis revealed that ozone, PM10, and PM2.5 concentrations are the dominant drivers of daily air quality fluctuations. The resulting forecasting system delivers robust, interpretable predictions across seasonal variations, offering a valuable decision support tool for urban air quality management. This framework demonstrates how advanced machine learning techniques can be applied in a Chinese urban context to inform global air pollution mitigation efforts.