Air Quality Prediction and Warning Based on Machine Learning

Authors

  • Lin Zhang

DOI:

https://doi.org/10.62051/ijgem.v4n1.72

Keywords:

Linear regression, Decision tree regression, Machine learning, Classification, Fitting

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.

Downloads

Download data is not yet available.

References

[1] Meng Xiaofeng, Hao Xinli, Ma Chaohong et al. Research on Machine Learning Methods in Scientific Discoveries [J]. Chinese Journal of Computer Science, 2023, 46 (05): 877-895.

[2] Xiao Jinjuan, Pang Jinxiang, Chen Wenzhuo. Principal component identification and classification of ancient glass based on random forest model [J]. Science and Technology Innovation, 2023 (14): 37-40.

[3] Ying Xiyuan, Sa Binhan. Prediction of Strawberry Volume and Quality Based on Linear Regression Model [J]. Advanced Mathematics Research, 2023, 26 (03): 86-90.

[4] Zhao Zheng, Yu Xiaojie, Xiong Yuzheng et al. PM2.5 prediction model based on regression analysis and decision tree algorithm [J]. Changjiang Information and Communication, 2022, 35 (11): 9-11.

Downloads

Published

27-08-2024

Issue

Section

Arcicles

How to Cite

Zhang, L. (2024). Air Quality Prediction and Warning Based on Machine Learning. International Journal of Global Economics and Management, 4(1), 609-616. https://doi.org/10.62051/ijgem.v4n1.72