Analisis Prediksi dan Klasifikasi Kualitas Udara DKI Jakarta Menggunakan Long Short-Term Memory (LSTM) dan Temporal Fusion Transformer (TFT)

Authors

  • Aulia Ulfah Universitas Pamulang
  • Taswanda Taryo Universitas Pamulang
  • Ahmad Musyafa

DOI:

https://doi.org/10.32493/jiup.v11i2.57466

Keywords:

Air quality, LSTM, TFT, Pollution prediction, ISPU

Abstract

Air quality in Jakarta is an environmental issue that affects public health, requiring an accurate analytical system. This study aims to analyze, predict, and classify air quality by comparing Long Short-Term Memory (LSTM) and Temporal Fusion Transformer (TFT) models. The data consist of time-series observations from 2020–2024, covering PM10, PM2.5, SO₂, CO, O₃, and NO₂ parameters. The research stages include data preprocessing, missing value interpolation, normalization, lag feature construction, and sequential data splitting into 80% training, 10% validation, and 10% testing sets to preserve temporal characteristics. The results show that TFT outperforms LSTM. For regression, TFT achieved R² values of 0.927 for SO₂, 0.619 for CO, and 0.363 for NO₂, while LSTM produced negative R² values for all parameters. For ISPU category classification, TFT achieved 90% accuracy, whereas LSTM achieved 86% accuracy and tended to be biased toward the majority class. These results indicate that TFT is more capable of capturing temporal patterns and complex relationships among variables, providing a more consistent deep learning approach for air quality prediction and classification.

References

[1] A. Zhafran, H. Ramadhan, B. Rahayudi, and D. E. Ratnawati, “PREDIKSI POLUSI UDARA DI DKI JAKARTA DENGAN MENGGUNAKAN METODE LONG-SHORT TERM MEMORY ( LSTM ),” vol. 1, no. 1, pp. 1–8, 2024.

[2] M. A. S. S. S. G. C. S. Wahyudi, “Air Quality Prediction Model of Surabaya City Using Long Short Term Memory (LSTM) Method,” Int. J. Eng. Appl., vol. 12, 2024, [Online]. Available: https://doi.org/10.15866/irea.v12i1.24289

[3] G. N. T. A. S. K. Depren, “Optimizing air quality predictions: A discrete wavelet transform and long short-term memory approach with wavelet-type selection for hourly PM10 concentrations,” J. Chemom., vol. 38, no. 4, 2024, [Online]. Available: https://doi.org/10.1002/cem.3539

[4] G. X. H. Z. L. Y. M. Z. C. L. Y. Huang, “Research on Regional Collaborative Prediction of Air Quality Based on LSTM-FC,” Int. Conf. Comput. Inf. Sci. Appl. Technol., 2024, [Online]. Available: https://doi.org/10.1109/CISAT62382.2024.10695184

[5] D. B. P. R. Ragiri, “A Deep Learning Approach to Enhance Air Quality Prediction: Comparative Analysis of LSTM, LSTM with Attention Mechanism and BiLSTM,” IEEE Reg. 10 Symp., 2024, [Online]. Available: https://doi.org/10.1109/TENSYMP61132.2024.10752321

[6] C. Z. Y. Tang, “An Empirical Analysis of the Long Short Term Memory and Temporal Fusion Transformer Models on Regional Air Quality Forecast,” 2023 Int. Conf. Cyber-Physical Soc. Intell., p. 73, Nov. 2023.

[7] V. Santhana Lakshmi and M. S. Vijaya, “Air Quality Index Prediction Model Using Temporal Fusion Transformer,” Int. J. Intell. Syst. Appl. Eng., vol. 12, no. 14, pp. 418–429, 2024.

[8] J. J. J. P. Costa, “Using Temporal Fusion Transformer Predictions to Maximise Use of Renewable Energy Sources,” Int. Work. Artif. Intell. Mach. Learn. Energy Transform., 2024, [Online]. Available: https://doi.org/10.1109/AIE61866.2024.10561261

[9] Z. N. X. H. D. Z. Y. W. S. Lan, “Interpretable wind power forecasting combining seasonal-trend representations learning with temporal fusion transformers architecture,” Energy, vol. 306, 2024, [Online]. Available: https://doi.org/10.1016/j.energy.2024.132482

[10] S. R. S. L. T. Lewandowski, “Interpretable Bike-Sharing Activity Prediction with a Temporal Fusion Transformer to Unveil Influential Factors: A Case Study in Hamburg, Germany,” Sustain., vol. 16, no. 8, 2024, doi: https://doi.org/10.3390/su16083230.

[11] M. Z. Wicaksono and L. E. Astrianty, “TIN : Terapan Informatika Nusantara Sistem Prediksi Kualitas Udara Menggunakan Algoritma Long Short- Term Memory ( LSTM ) TIN : Terapan Informatika Nusantara,” vol. 6, no. 7, pp. 831–840, 2025, doi: https://doi.org/10.47065/tin.v6i7.8619.

[12] S. Sinsomboonthong, “Performance Comparison of New Adjusted Min-Max with Decimal Scaling and Statistical Column Normalization Methods for Artificial Neural Network Classification,” vol. 2022, 2022, doi: https://doi.org/10.1155/2022/3584406.

[13] S. H. M. Hickman and P. T. Griffiths, “Short-term forecasting of ozone air pollution across Europe with transformers,” pp. 1–20, 2023, doi: https://doi.org/10.1017/eds.2023.37.

[14] S. A. Pratiwi, A. Fauzi, S. Arum, P. Lestari, and Y. Cahyana, “KLIK: Kajian Ilmiah Informatika dan Komputer Prediksi Persediaan Obat Pada Apotek Menggunakan Algoritma Decision Tree,” Media Online, vol. 4, no. 4, pp. 2381–2388, 2024, doi: https://doi.org/10.30865/klik.v4i4.1681.

[15] M. Fahmi and I. K. G. Suhartana, “Perbandingan Algoritma Decision Tree Dan Support Vector Machine Dalam Prediksi Kualitas Udara,” vol. 1, no. November, pp. 21–30, 2022.

[16] G. E. Saputra, M. Hanindia, P. Swari, and A. L. Nurlaili, “Implementasi Algoritma XGBoost , CatBoost , dan LGBM untuk Klasifikasi Pencemaran Udara,” vol. 8, pp. 14135–14139, 2025, doi: https://doi.org/10.54371/jiip.v8i12.10102

Downloads

Published

2025-06-30