Air Quality Prediction Using Machine Learning
Author
S. Harsha Varthini, J. Steffi
Abstract
Air pollution is one of the major environmental challenges affecting human health and environmental sustainability. Accurate prediction of air quality can support the assessment of pollution levels and facilitate appropriate preventive actions. This study proposes a machine learning-based system for predicting the Air Quality Index (AQI) using major air pollutant parameters. The dataset consists of 18,265 records, from which nine pollutant features, namely PM2.5, PM10, NO, NO₂, NOx, NH₃, CO, SO₂, and O₃, are selected as input variables. Data preprocessing is performed by handling missing numerical values using mean imputation and removing duplicate records. Four machine learning regression algorithms, namely Decision Tree, Random Forest, Gradient Boosting, and Support Vector Regression, are implemented and compared using Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and R² Score. Experimental results show that the Random Forest Regressor achieves the best performance with an MAE of 1.0396, RMSE of 6.3586, and R² Score of 0.9970. The selected model is integrated into a Flask-based web application for AQI prediction and categorization of the predicted AQI value into the appropriate AQI category. In addition, the system provides an AQI level meter, health advice, precautions, recommended actions, air quality improvement measures, and an overall recommendation based on the predicted AQI level. The proposed system combines machine learning-based AQI prediction with a user-oriented interface to provide an understandable and informative assessment of air quality.
Keywords
Air Quality Index, Air Pollution, Machine Learning, Random Forest, AQI Prediction, Regression, Flask, Health Advice.
Full Text:
Download Paper PDF
References
[1] K. Kumar and B. P. Pande, “Air pollution prediction with machine learning: A case study of Indian cities,” International Journal of Environmental Science and Technology, vol. 20, no. 5, pp. 5333–5348, 2023, doi: 10.1007/s13762-022-04241-5.
[2] G. Ravindiran, G. Hayder, K. Kanagarathinam, A. Alagumalai, and C. Sonne, “Air quality prediction by machine learning models: A predictive study on the Indian coastal city of Visakhapatnam,” Chemosphere, vol. 338, Art. no. 139518, 2023, doi: 10.1016/j.chemosphere.2023.139518.
[3] S. K. Natarajan, P. Shanmurthy, D. Arockiam, B. Balusamy, and S. Selvarajan, “Optimized machine learning model for air quality index prediction in major cities in India,” Scientific Reports, vol. 14, Art. no. 6795, 2024, doi: 10.1038/s41598-024-54807-1.
[4] S. Mourya and P. Tawde, “Air Quality Index Prediction Using Machine Learning,” International Journal of Scientific Research and Engineering Methods (IJSREM), vol. 08, no. 03, 2024, doi: 10.55041/IJSREM29538.
[5] Mandvi, H. K. Singh, P. K. Patel, and S. Singh, “Evaluation of Predictive Models for Air Quality Index Prediction in an Indian Urban Area,” Journal of Indian Association for Environmental Management, vol. 44, no. 3, pp. 31–40, 2024.
[6] N. N. Maltare and S. Vahora, “Air Quality Index prediction using machine learning for Ahmedabad city,” Digital Chemical Engineering, vol. 7, Art. no. 100093, 2023, doi: 10.1016/j.dche.2023.100093.
[7] A. H. Almaliki, A. Derdour, and E. Ali, “Air Quality Index (AQI) Prediction in Holy Makkah Based on Machine Learning Methods,” Sustainability, vol. 15, no. 17, Art. no. 13168, 2023, doi: 10.3390/su151713168.
[8] N. Srinivasa Gupta, Y. Mohta, K. Heda, R. Armaan, B. Valarmathi, and G. Arulkumaran, “Prediction of Air Quality Index Using Machine Learning Techniques: A Comparative Analysis,” Journal of Environmental and Public Health, vol. 2023, Art. no. 4916267, 2023, doi: 10.1155/2023/4916267.
[9] M. M. Abdelmalek, H. Mahmoud, and H. Shokry, “Prognosis of air quality index and air pollution using machine learning techniques,” Scientific Reports, vol. 15, Art. no. 25890, 2025, doi: 10.1038/s41598-025-11260-y.
[10] Muni Lakshmi G. K. and Mokesh Rayalu G., “Regression based hybrid machine learning model performance evaluation on air quality index prediction in Kolkata,” Scientific Reports, vol. 16, Art. no. 26399, 2026, doi: 10.1038/s41598-026-54918-x.
Share your valuable work from Social Media Buttons