Building of Informatics, Technology and Science
Vol 8 No 2 (2026): September 2026

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

Nanda Putri Karizki (Universitas Teknokrat Indonesia, Bandar Lampung)
Heni Sulistiani (Universitas Teknokrat Indonesia, Bandar Lampung)



Article Info

Publish Date
08 Sep 2026

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.

Copyrights © 2026






Journal Info

Abbrev

bits

Publisher

Subject

Computer Science & IT

Description

Building of Informatics, Technology and Science (BITS) is an open access media in publishing scientific articles that contain the results of research in information technology and computers. Paper that enters this journal will be checked for plagiarism and peer-rewiew first to maintain its quality. ...