Air Quality Prediction and Warning Based on Machine Learning

Lin Zhang
DOI: https://doi.org/10.62051/ijgem.v4n1.72
2024-08-27
Abstract:This article explores the factors related to changes in PM2.5 concentration from the perspective of machine learning, predicts daily air quality, and analyzes its warning level. Firstly, construct an indicator system with component factors and climate factors as independent variables, and PM2.5 concentration value as the dependent variable; Next, two machine learning algorithms, linear regression and decision tree regression, were used to construct models for regression prediction. The fitting curve between the predicted values and the true values was used to demonstrate the fitting effect, and it was found that decision tree regression had the best fitting. In two models, we trained predictions with step sizes of 3, 5, 7, and 12, respectively. We called the mean_squared_error standard library in Python to calculate the RMSE for each step, and weighted the RMSE for different step sizes of the two models to obtain the final RMSE. To more accurately predict the PM2.5 concentration value for the required date in the question, we extracted data from the time period of each year, calculated the average of each attribute as the test set, and imported it into the model. We then weighted and summed the predicted values of the two models to obtain the final PM2.5 prediction value. Finally, a visual analysis was conducted on the test set and its prediction results to more intuitively demonstrate the prediction performance.
What problem does this paper attempt to address?