<p>Rapid economic development, industrialization, and urbanization in Indonesia have caused a large increase in air pollution with negative impacts on the environment and public health. The aim of this research is to use machine learning techniques to categorize air quality and generate an air quality index (AQI) using a dataset that includes six prevalent air pollutants. Next steps are preprocessing and data extraction, K-nearest neighbors (KNN) classification, support vector machine (SVM), and random forest (RF) models are implemented. Furthermore, synthetic minority oversampling technique (SMOTE) is incorporated into the ensemble learning process to improve the results. This research uses K-fold cross validation for improve classification accuracy and reduce overfitting. Research findings show that the application of SMOTE brings a significant increase in model accuracy, effectively solving the problem of imbalanced data sets. These insights provide direction for effective air quality monitoring systems and informed decision making in air pollution management.</p>