Analisis Prediksi dan Klasifikasi Kualitas Udara DKI Jakarta Menggunakan Long Short-Term Memory (LSTM) dan Temporal Fusion Transformer (TFT)
DOI:
https://doi.org/10.32493/jiup.v11i2.57466Keywords:
Air quality, LSTM, TFT, Pollution prediction, ISPUAbstract
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
License
Copyright (c) 2025 Aulia Ulfah, Taswanda Taryo, Ahmad Musyafa

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).
Jurnal Informatika Universitas Pamulang have CC-BY-NC or an equivalent license as the optimal license for the publication, distribution, use, and reuse of scholarly work.
In developing strategy and setting priorities, Jurnal Informatika Universitas Pamulang recognize that free access is better than priced access, libre access is better than free access, and libre under CC-BY-NC or the equivalent is better than libre under more restrictive open licenses. We should achieve what we can when we can. We should not delay achieving free in order to achieve libre, and we should not stop with free when we can achieve libre.
Jurnal Informatika Universitas Pamulang is licensed under a Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)
YOU ARE FREE TO:
- Share : copy and redistribute the material in any medium or format
- Adapt : remix, transform, and build upon the material for any purpose, even commercially.
- The licensor cannot revoke these freedoms as long as you follow the license terms

