Implementasi Teknik SMOTE Menggunakan Random Forest dan XGBoost pada Klasifikasi Tingkat Kualitas Udara


  • Nanda Putri Karizki * Mail Universitas Teknokrat Indonesia, Bandar Lampung, Indonesia
  • Heni Sulistiani Universitas Teknokrat Indonesia, Bandar Lampung, Indonesia
  • (*) Corresponding Author
Keywords: Air Quality; Class Imbalance; Ensemble Learning; Random Forest; SMOTE; XGBoost

Abstract

Air pollution is a global environmental issue with significant impacts on public health and environmental sustainability. The problem is compounded by the generally imbalanced class distribution in air quality data; consequently, the highest-risk category "Hazardous" often constitutes the minority class, making it the most difficult to detect using conventional classification models. This study implements a machine learning approach using Random Forest and XGBoost algorithms combined with the Synthetic Minority Oversampling Technique (SMOTE) to classify air quality levels. The dataset comprises 5,000 samples featuring nine environmental and demographic variables. Air quality is categorized into four classes Good, Moderate, Poor, and Hazardous with an initial imbalanced distribution (Good: 40%, Moderate: 30%, Poor: 20%, Hazardous: 10%). SMOTE was applied exclusively to the training data to balance the class distribution. Results indicate that XGBoost combined with SMOTE achieved the best performance, yielding an accuracy of 0.952, an F1-Score of 0.952, and an average cross-validation score of 0.969. This represents a 0.022 improvement over a previous study that utilized a Decision Tree model without SMOTE (achieving 0.930 accuracy). For the "Hazardous" minority class, the XGBoost-SMOTE combination improved recall from 0.80 (Random Forest without SMOTE) to 0.87, while also achieving more balanced precision and F1-Score values ​​(0.87). CO levels and proximity to industrial areas emerged as the dominant features, contrasting with PM2.5 in the earlier study. These findings confirm that combining ensemble methods with SMOTE effectively addresses class imbalance. Evaluation was conducted using precision, recall, and F1-Score metrics, alongside 5-fold stratified cross-validation to ensure model stability across all classes including the "Hazardous" minority class, which is most critical for public health. These results suggest that combining ensemble algorithms with data balancing techniques can serve as a practical reference for developing machine learning-based air quality monitoring systems.

Downloads

Download data is not yet available.

References

W. H. Organization, “WHO Global Air Quality Guidelines: Particulate Matter (PM2.5 and PM10), Ozone, Nitrogen Dioxide, Sulfur Dioxide and Carbon Monoxide,” Geneva, 2021. [Online]. Available: https://iris.who.int/handle/10665/345329

K. Kumar and A. Pande, “Air pollution prediction with machine learning: a case study of Indian cities,” International Journal of Environmental Science and Technology, vol. 20, pp. 5333–5348, 2023, doi: 10.1007/s13762-022-04241-5.

M. Karmoude, “Machine learning for air quality prediction and data analysis: Review on recent advancements, challenges, and outlooks,” Science of the Total Environment, vol. 1002, p. 180593, 2025, doi: 10.1016/j.scitotenv.2025.180593.

I. E. Agbehadji and I. C. Obagbuwa, “Systematic Review of Machine Learning and Deep Learning Techniques for Spatiotemporal Air Quality Prediction,” Atmosphere (Basel)., vol. 15, no. 11, p. 1352, 2024, doi: 10.3390/atmos15111352.

W. Peng, X. Liu, and F. Taghizadeh-Hesary, “Carbon Monoxide Emission and Air Quality Analysis Based on an Improved Double-Weight Fuzzy Comprehensive Evaluation,” Front. Public Health, vol. 9, p. 790383, 2022, doi: 10.3389/fpubh.2021.790383.

V. Ignatenko, A. Surkov, and S. Koltcov, “Random forests with parametric entropy-based information gains for classification and regression problems,” PeerJ Comput. Sci., vol. 10, p. e1775, 2024, doi: 10.7717/peerj-cs.1775.

C. Bentéjac, A. Csörgő, and G. Martínez-Muñoz, “A comparative analysis of gradient boosting algorithms,” Artif. Intell. Rev., vol. 54, no. 3, pp. 1937–1967, 2021, doi: 10.1007/s10462-020-09896-5.

I. G. I. Sudipa, M. Habibi, E. S. J. Atmadji, and I. Arfiani, “Predictive Modeling of Air Quality Levels Using Decision Tree Classification: Insights from Environmental and Demographic Factors,” Indonesian Journal of Data and Science, vol. 4, no. 3, pp. 251–258, 2024, doi: 10.56705/ijodas.v5i3.201.

S. Rezvani and X. Wang, “A broad review on class imbalance learning techniques,” Appl. Soft Comput., vol. 143, p. 110415, 2023, doi: 10.1016/j.asoc.2023.110415.

W. Chen, K. Yang, Z. Yu, Y. Shi, and C. L. P. Chen, “A survey on imbalanced learning: latest research, applications and future directions,” Artif. Intell. Rev., vol. 57, no. 6, p. 137, 2024, doi: 10.1007/s10462-024-10759-6.

X. Yi, Y. Xu, Q. Hu, S. Krishnamoorthy, W. Li, and Z. Tang, “ASN-SMOTE: a synthetic minority oversampling method with adaptive qualified synthesizer selection,” Complex & Intelligent Systems, vol. 8, no. 3, pp. 2247–2272, 2022, doi: 10.1007/s40747-021-00638-w.

I. Araf, A. Idri, and I. Chairi, “Cost-sensitive learning for imbalanced medical data: a review,” Artif. Intell. Rev., vol. 57, no. 4, p. 80, 2024, doi: 10.1007/s10462-023-10652-8.

Y. Li, Y. Yang, P. Song, L. Duan, and R. Ren, “An improved SMOTE algorithm for enhanced imbalanced data classification by expanding sample generation space,” Sci. Rep., vol. 15, p. 23521, 2025, doi: 10.1038/s41598-025-09506-w.

A. F. B. Sajiwo, B. Rahmat, and A. Junaidi, “Klasifikasi Indeks Standar Pencemaran Udara (ISPU) Menggunakan Algoritma XGBoost dengan Teknik Imbalanced Data (SMOTE),” Jurnal Informatika dan Teknik Elektro Terapan, vol. 12, no. 3, pp. 234–242, 2024, doi: 10.23960/jitet.v12i3.4699.

B. Bala and S. Behal, “A Brief Survey of Data Preprocessing in Machine Learning and Deep Learning Techniques,” in 2024 8th International Conference on I-SMAC (IoT in Social, Mobile, Analytics and Cloud) (I-SMAC), 2024, pp. 1755–1762. doi: 10.1109/I-SMAC61858.2024.10714767.

E. Barbierato and A. Gatti, “The Challenges of Machine Learning: A Critical Review,” Electronics (Basel)., vol. 13, no. 2, p. 416, 2024, doi: 10.3390/electronics13020416.

J. Zhu, Z. Zhang, W. Gu, C. Zhang, J. Xu, and P. Li, “Air Quality Prediction Using Neural Networks with Improved Particle Swarm Optimization,” Atmosphere (Basel)., vol. 16, no. 7, p. 870, 2025, doi: 10.3390/atmos16070870.

Y. Y. Ghadi et al., “Explainable AI analysis for smog rating prediction,” Sci. Rep., vol. 15, p. 8070, 2025, doi: 10.1038/s41598-025-92788-x.

A. A. Khan, O. Chaudhari, and R. Chandra, “A review of ensemble learning and data augmentation models for class imbalanced problems: Combination, implementation and evaluation,” Expert Syst. Appl., vol. 244, p. 122778, 2024, doi: 10.1016/j.eswa.2023.122778.

Y. Han, Z. Wei, and G. Huang, “An imbalance data quality monitoring based on SMOTE-XGBOOST supported by edge computing,” Sci. Rep., vol. 14, p. 10151, 2024, doi: 10.1038/s41598-024-60600-x.

A. R. Salehi and M. Khedmati, “A cluster-based SMOTE both-sampling (CSBBoost) ensemble algorithm for classifying imbalanced data,” Sci. Rep., vol. 14, p. 5152, 2024, doi: 10.1038/s41598-024-55598-1.

B. Nemade, V. Bharadi, S. S. Alegavi, and B. Marakarkandy, “A Comprehensive Review: SMOTE-Based Oversampling Methods for Imbalanced Classification Techniques, Evaluation, and Result Comparisons,” International Journal of Intelligent Systems and Applications in Engineering, vol. 11, no. 9s, pp. 790–803, 2023, [Online]. Available: https://ijisae.org/index.php/IJISAE/article/view/3268

M. Mujtaba, “Air Quality and Pollution Assessment Dataset,” 2023. [Online]. Available: https://www.kaggle.com/datasets/mujtabamatin/air-quality-and-pollution-assessment


Bila bermanfaat silahkan share artikel ini

Berikan Komentar Anda terhadap artikel Implementasi Teknik SMOTE Menggunakan Random Forest dan XGBoost pada Klasifikasi Tingkat Kualitas Udara

Dimensions Badge
Article History
Submitted: 2026-07-04
Published: 2026-09-08
Abstract View: 209 times
PDF Download: 140 times
How to Cite
Karizki, N., & Sulistiani, H. (2026). Implementasi Teknik SMOTE Menggunakan Random Forest dan XGBoost pada Klasifikasi Tingkat Kualitas Udara. Building of Informatics, Technology and Science (BITS), 8(2), 763-773. https://doi.org/10.47065/bits.v8i2.10602
Section
Articles

Most read articles by the same author(s)