Emad Elabd, Hany Mohamed Hamouda, M. A. Mohamed Ali, A. S. Hamid, Yasser Fouad
Accurate Air Quality Index (AQI) classification is essential for environmental surveillance and public health decision-making. Using a publicly available daily U.S. county-level dataset with six AQI categories (Good, Moderate, Unhealthy for Sensitive Groups, Unhealthy, Very Unhealthy, Hazardous), we conducted a comprehensive benchmarking study. Data preprocessing included missing-value imputation and class balancing via Synthetic Minority Over-sampling Technique (SMOTE). We trained and evaluated classical and deep models (Random Forest (RF), Extra Trees (ET), K-Nearest Neighbors (KNN), Naive Bayes (NB), Logistic Regression (LR), and a Multi-Layer Perceptron (MLP)) and assessed performance using cross-validation accuracy, test accuracy, macro-averaged recall, F1-score, and ROC-AUC. Ensemble methods (RF, ET) and the MLP consistently outperformed traditional baselines. RF achieved 99.3% test accuracy with perfect recall, F1-score, and ROC-AUC; MLP achieved 99.0% test accuracy. A stacking ensemble, optimized with a hybrid Particle Swarm–Grey Wolf Optimizer (PSO–GWO), delivered 99.99% test accuracy, 99.99% macro-averaged recall, and 1.0000 ROC-AUC. These findings demonstrate that combining ensemble learning with metaheuristic optimization can substantially enhance multi-class AQI classification performance and offer a practical path toward reliable, real-time air-quality assessment.