Comparative Analysis of XGBoost, Random Forest, and Logistic Regression for Classifying Jakarta’s Air Pollution Index (ISPU)
Jakarta’s air pollution is still a major problem for the environment and general public’s health. In this study, Jakarta’s Air Pollution Index (ISPU) is categorized into three groups: Good, Moderate, and Unhealthy based on a comparison of three monitored machine learning algorithms: Logistic Regression, Random Forest, and eXtreme Gradient Boosting (XGBoost). A total of 1,367 Data were used combining weather and air quality data from 2021 to 2024 were analyzed. The novelty of this study lies in evaluating and comparing the impact of three feature selection scenarios—without feature selection, Random Projection, and Pearson Correlation—on model performance. The tests evaluated the models’ F1 score, 10x cross-validation, accuracy, precision, and recall scores. XGBoost consistently performed better achieving the highest accuracy of 98.91%, consistently outperforming other models across all feature selection scenarios. Random Forest also showed strong accuracy (97.08%), particularly when using Pearson Correlation. Although Logistic Regression was arithmetic efficient and interpretable, performance suffered greatly when important features were eliminated. Pearson Correlation positively influenced model performance by removing weakly related features, especially for tree-based methods like XGBoost and Random Forest, which improved both accuracy and interpretability. In contrast, Random Projection caused a noticeable performance decline in all models due to its randomized nature, which may have removed or distorted essential feature relationships, especially in simpler models like Logistic Regression. These findings highlight the importance of appropriate feature selection in improving model accuracy and interpretability in air quality classification tasks.
Authors
- Rudy Hartanto (ORCID: https://orcid.org/0000-0003-1126-2340)
- Julian Julian
- Rico Halim (ORCID: https://orcid.org/0009-0004-8005-1349)
- Indra Marihot Rajagukguk
Institutions
- Binus University (ID)
Publication Details
- Journal
- Procedia Computer Science
- Published
- 2025-01-01
- DOI
- https://doi.org/10.1016/j.procs.2025.08.264
- Citations
- 1
- Primary Topic
- Air Quality Monitoring and Forecasting
- Type
- article
- Field-Weighted Citation Impact
- 0.80