摘要:In recent years, with the rapid development of China’s economy and the continuous improvement of people’s quality of life, air pollution caused by a large amount of energy consumption has become increasingly serious. Air quality index (AQI) has become an important basis to measure air quality. At present, the research on air quality assessment and prediction methods has become increasingly active at home and abroad, which is of great significance to guide people’s production and life. In this paper, Taking Shijiazhuang, Hebei Province as an example and using the XGBoost model of the machine learning ensemble algorithm, regression fitting was performed on the six pollutant concentrations that currently mainly affect air quality, and the hourly prediction of AQI was achieved.The trained model has lower mean absolute error (MAE) and higher correlation coefficient (R-square), which improves the prediction ability of urban air quality prediction, provides a new idea for urban air quality prediction, and has a broad application prospect in the future urban air quality prediction.