IAES International Journal of Artificial Intelligence (IJ-AI)
Vol 15, No 3: June 2026

Machine learning approaches for anomaly detection of Jakarta air quality index

Muhammad Rizky Nurhambali (IPB University)
Yenni Angraini (IPB University)
Anwar Fitrianto (IPB University)



Article Info

Publish Date
01 Jun 2026

Abstract

Anomalies in time series data are observations that deviate markedly from surrounding values or overall patterns. Air quality index (AQI) data, which vary over time, provide a suitable context for anomaly detection. Time series anomaly detection can be done with machine learning approaches like long short-term memory (LSTM) and extreme gradient boosting (XGBoost). These methods have advantages over conventional methods in handling nonlinearity and large data dimensions. This study compares LSTM and XGBoost methods for detecting anomalies in Jakarta's hourly AQI data. The dataset was obtained from the AirNow website and covers the period from January 1, 2018, to December 31, 2023. Anomalies in the observed data were labeled using moving range (MR) (2) and (3) approaches with three and four-sigma thresholds, and feature engineering (FE) was applied to improve model performance. The results indicate that LSTM is more suitable than XGBoost for forecasting and classification tasks in AQI data. LSTM achieved an average mean absolute percentage error (MAPE) of 10.3840%, a root mean square error (RMSE) of 10.5913, and a balanced accuracy (BACC) of 0.9424 under MR (2) labeling with the four-sigma rule. The anomalies detected mostly occurred between 21:00 and 09:00 and during the rainy season.

Copyrights © 2026






Journal Info

Abbrev

IJAI

Publisher

Subject

Computer Science & IT Engineering

Description

IAES International Journal of Artificial Intelligence (IJ-AI) publishes articles in the field of artificial intelligence (AI). The scope covers all artificial intelligence area and its application in the following topics: neural networks; fuzzy logic; simulated biological evolution algorithms (like ...