nav emailalert searchbtn searchbox tablepage yinyongbenwen piczone journalimg journalInfo journalinfonormal searchdiv searchzone qikanlogo popupnotification paper paperNew
2026, 02, v.26 797-806
Prediction and factor analysis of air quality in Mianyang using XGBoost and SHAP
Email:
DOI: 10.13637/j.issn.1009-6094.2025.0655
Published:   2025-10-31
Publication Date:   2025-10-31
Online:   2025-10-31
Mobile reading
Abstract:

As urbanization accelerates, air pollution has become an increasingly prominent issue. Accurately predicting the Air Quality Index(AQI) is crucial for early pollution warning and effective scientific governance. This paper aims to develop a high-precision and interpretable AQI prediction model to identify the key driving factors behind air pollution and provide decision support for environmental management. Utilizing daily average air quality monitoring data from Mianyang City spanning 2013 to 2024, we analyze the temporal variation trends of various pollutant concentrations. Spearman correlation analysis was employed to uncover the quantitative relationship between the dependent variable(AQI) and independent variables. The Extreme Gradient Boosting(XGBoost) algorithm was utilized to develop the AQI prediction model, while the Shapley Additive Explanations(SHAP) method was applied to analyze the interpretability of the model's outputs, quantifying the contribution of each pollution factor to the AQI. Furthermore, comparative experiments were conducted with other models to evaluate the performance of the XGBoost model. The results indicate that the coefficient of determination(R2) for the XGBoost model was 0.99 for the training set and 0.96 for the test set, with a Mean Squared Error(MSE) of 50.47. The prediction performance of the XGBoost model outperforms that of other machine learning models. SHAP analysis further revealed that ozone(O3), fine particulate matter(PM2.5), and inhalable particulate matter(PM10) are the primary factors influencing changes in AQI, with their combined contribution exceeding 80%. Additionally, significant differences in influence weights among various pollutants were observed during periods of high pollution incidence compared to those with good air quality, indicating a more pronounced synergistic effect among pollutants in high-concentration scenarios. The XGBoost-SHAP model proposed in this paper effectively enhances the accuracy of air quality predictions and facilitates in-depth analyses of pollution causes. These research findings provide a scientific basis for precise control and time-segmented regulation of urban air pollution.

References

[1] 涂佩玥,杨欢,陈兰洲,等.中国重点城市大气污染与健康风险的时空分布特征[J].环境学,2023,44(11):5954-5963.TU P Y,YANG H,CHEN L Z,et al.Spatial and temporal distribution of air pollution and health risks in key cities in China[J].Environmental Science,2023,44(11):5954-5963.

[2] HE X,ZHANG S,BAI Q,et al.Air pollution exposure and prevalence of non-alcoholic fatty liver disease and related cirrhosis:a systematic review and meta-analysis[J].Ecotoxicology and Environmental Safety,2025,289:117469.

[3] BRUNEKREEF B.Health effects of air pollution observed in cohort studies in Europe[J].Journal of Exposure Science & Environmental Epidemiology,2007,17(Suppl.2):S61-S65.

[4] 高庆先,刘俊蓉,王宁,等.APEC期间北京及周边城市AQI区域特征及天气背景分析[J].环境科学,2015,36(11):3952-3960.GAO Q X,LIU J R,WANG N,et al.Analysis of AQI regional characteristics and weather background in Beijing and surrounding cities during APEC[J].Environmental Science,2015,36(11):3952-3960.

[5] GUNDETI R S,JATAVALLABHULA K J,DHARMAVARAPU P,et al.Machine learning-driven prediction of Gaussian curvature deviation in reverse engineered freeform surfaces[J].Surface Topography:Metrology and Properties,2025,13(2):025028.

[6] ROOPALAKSHMI R,SREELATHA R.A novel light GBM framework combined with gain optimization for predicting dementia severity of Alzheimer's disease[J].Computer Methods in Biomechanics and Biomedical Engineering:Imaging & Visualization,2024,12(1):1-12.

[7] 景国勋,卢一瑾,王远声,等.基于“灰色+非线性回归”的煤矿死亡人数预测[J].安全与环境学报,2024,24(5):1922-1929.JING G X,LU Y J,WANG Y S,et al.Prediction of coal mine fatalities based on "grey + nonlinear regression"[J].Journal of Safety and Environment,2024,24(5):1922-1929.

[8] 白云,李勇.基于VMD-LSSVR的河水水质预测方法[J].安全与环境学报,2020,20(3):1162-1168.BAI Y,LI Y.River water quality prediction method based on VMD-LSSVR[J].Journal of Safety and Environment,2020,20(3):1162-1168.

[9] 赵广金,张天麒,程五一.地质勘探高发事故模式及影响因素分析[J].安全与环境学报,2011,11(5):210-213.ZHAO G J,ZHANG T Q,CHENG W Y.Analysis of high-incidence accident patterns and influencing factors in geological exploration[J].Journal of Safety and Environment,2011,11(5):210-213.

[10] CHEN T,GUESTRIN C.XGBoost:a scalable tree boosting system[J].CoRR,2016,1603:02754.

[11] 夏润,张晓龙.基于改进集成学习算法的在线空气质量预测[J].武汉科技大学学报,2019,42(1):61-67.XIA R,ZHANG X L.Online air quality prediction based on improved ensemble learning algorithm[J].Journal of Wuhan University of Science and Technology,2019,42(1):61-67.

[12] LAMANE H,MOUHIR L,MOUSSADEK R,et al.Interpreting machine learning models based on SHAP values in predicting suspended sediment concentration[J].International Journal of Sediment Research,2025,40(1):91-107.

[13] LUNDBERG S M,LEE S I.A unified approach to interpreting model predictions[J].Advances in Neural Information Processing Systems,2017,30:4765-4774.

[14] MUHAMMAD A,TABASAM R,ASIF A.Fermatean fuzzy multi-criteria decision-making based on spearman rank correlation coefficient[J].Granular Computing,2023,8(6):2005-2019.

[15] AMJAD M A,SIGURDUR E,LEIF S,et al.Predicting pavement condition index using an ML approach for a municipal street network[J].Journal of Transportation Engineering,Part B:Pavements,2025,151(2):04025025.

[16] ANJALI B,JUNAID S F,ANOOP M N K,et al.Interpretable machine learning for cost estimation in underground pipe installation[J].Journal of Pipeline Systems Engineering and Practice,2025,16(3):05025004.

[17] 谢学斌,孔令燕.基于ARIMA和XGBoost组合模型的交通事故预测[J].安全与环境学报,2021,21(1):277-284.XIE X B,KONG L Y.Traffic accident prediction based on the combined model of ARIMA and XGBoost[J].Journal of Safety and Environment,2021,21(1):277-284.

[18] LI K,JACOB J D,LIAO H,et al.A two-pollutant strategy for improving ozone and particulate air quality in China[J].Nature Geoscience,2019,12(11):906-910.

[19] ADARSH S,SUCHI S.From development to deployment:dataset shift,causality,and shift-stable models in health AI[J].Biostatistics (Oxford,England),2020,21(2):345-352.

[20] RITZY R,UMADEVI V A,GIRIJA K,et al.Binary-class concrete surface crack detection using a transfer learning model[J].Knowledge-Based Systems,2025,324:113953.

Basic Information:

DOI:10.13637/j.issn.1009-6094.2025.0655

China Classification Code:X51

Citation Information:

[1]WEI Jiafang,WEI Rongsheng,ZHAO Tianci ,et al.Prediction and factor analysis of air quality in Mianyang using XGBoost and SHAP[J].Journal of Safety and Environment,2026,26(02):797-806.DOI:10.13637/j.issn.1009-6094.2025.0655.

Fund Information:

甘肃省水利科学试验研究与技术推广计划项目(25GSLK053,25GSLK059); 兰州市第三批科技计划项目(科技支撑专项)(2024-3-84); 兰州理工大学2025年青年教师学科交叉研究培育项目(062516)

Published:  

2025-10-31

Publication Date:  

2025-10-31

Online:  

2025-10-31

Search Advanced Search