Journal
Application of Long Short Term Memory, Gated Recurrent Unit, and Hybrid LSTM-GRU in Air Quality Forecasting Based on Air Pollution Index in Semarang City
Unnes Journal of Mathematics · Vol. 14 No. 2 (2025) · pp. 29–38
- ISSN
- 2460-5859, 2252-6943
- Published
- 2025-10-31
- Publisher
- Universitas Negeri Semarang
- Language
- eng
Abstract
Air pollution harms human health, and Semarang City is among the most polluted cities in Indonesia, so forecasts of the Air Pollution Index (ISPU) are needed to anticipate poor air quality. This study compares three deep learning methods for forecasting the ISPU: Long Short Term Memory (LSTM), which retains long-term information through its memory cell and gates and overcomes the vanishing gradient problem; Gated Recurrent Unit (GRU), which has fewer gates and parameters and therefore trains faster; and a Hybrid LSTM-GRU, which is expected to combine the long-term memory of LSTM with the efficiency of GRU. The data are 35,064 hourly observations of seven pollutant parameters (PM10, PM2.5, SO2, CO, O3, NO2, and HC) from the Semarang City Environmental Agency, from January 1, 2021 to December 31, 2024. After time-based interpolation of missing values, min–max normalization, an 80:20 split, and a sliding window of 24 hours, each model was trained with two numbers of neurons and three learning rates (six combinations per model) and evaluated with the mean RMSE and MAE. The best LSTM (100 neurons, learning rate 0.001) gave a mean RMSE of 0.7631 and MAE of 0.2470, the best GRU (50 neurons, 0.001) 0.7600 and 0.2215, and the best Hybrid LSTM-GRU (50 neurons, 0.001) 0.7597 and 0.2193. The Hybrid model is the most accurate, but its advantage over GRU is very small (0.04% in RMSE and 1.0% in MAE) and is clearer against LSTM in MAE (11.2%). The 24-hour forecast for January 1, 2025 shows PM2.5 as the determining parameter, with unhealthy air quality in the early morning and late evening. The forecasts can support early warning; the models should still be tested with repeated runs and against baseline models.
Keywords
Collaboration network of the authors
40 authors · 123 co-authorship links · 1 across different organisations · showing the 40 most connected
Hover or tap a name to highlight its co-authors. Double-click to open the author's page.
- Hasanuddin University
- Institut Teknologi Kalimantan
- State University of Semarang
- Universitas Sulawesi Barat
- University of Indonesia
- Affiliation unknown
- Different organisations
- Same organisation
- Affiliation unknown
- Thicker line = more joint articles · bigger circle = more articles
Show as table
| Co-author | Organisation | Joint articles |
|---|---|---|
| Agung Putra | Affiliation unknown | 2 |
| Iffan Alif | Affiliation unknown | 2 |
| Destyariani Liana Putri | Institut Teknologi Kalimantan | 1 |
| Muhammad Khaisar Wirawan | Institut Teknologi Kalimantan | 1 |
| Nurul Hidayah | Institut Teknologi Kalimantan | 1 |
| Siti Suleman | Affiliation unknown | 1 |
| Andhika Hayyu Pratama | Affiliation unknown | 1 |
| Fabelyn Gandryal Mistipa | Affiliation unknown | 1 |
| Muhammad Fakhri Ardyansyah | Affiliation unknown | 1 |
| Hans Julio Pratama | Affiliation unknown | 1 |
| Fabelyn Gandryal Mistipa Avin | Hasanuddin University | 1 |
| Siti Arifaini Suleman | Hasanuddin University | 1 |
| Andhika Hayyu Pratama | Hasanuddin University | 1 |
| Muhammad Fakhri Ardyansyah | Hasanuddin University | 1 |
| Nurul Hidayah | Hasanuddin University | 1 |
| Hans Julio Pratama | Hasanuddin University | 1 |
| Nurfadilah Nurfadilah | Hasanuddin University | 1 |
| Haris Haris | Universitas Sulawesi Barat | 1 |
| Dinil Qaiyimah | Affiliation unknown | 1 |
| Misdar Amdah | Affiliation unknown | 1 |
| Mulianti Mulianti | Affiliation unknown | 1 |
| Nasrul Nasrul | Affiliation unknown | 1 |
| As'adi Abdullah | Affiliation unknown | 1 |
| Elis Tambaru | Hasanuddin University | 1 |
| Ari Yuniastuti | State University of Semarang | 1 |
| Edi Waluyo | Affiliation unknown | 1 |
| Wisnu Sunarto | Affiliation unknown | 1 |
| Sri Wardani | Affiliation unknown | 1 |
| Siti Nurrohmah | University of Indonesia | 1 |
| Rodia Syamwil | Affiliation unknown | 1 |
| Ipang Setiawan | Affiliation unknown | 1 |
| Sofwan Indarjo | State University of Semarang | 1 |
| Astri Yunita | Affiliation unknown | 1 |
| Mohamad Muspawi | Affiliation unknown | 1 |
| Firman Firman | Hasanuddin University | 1 |
| Arda Trisnawaty Panjaitan | Affiliation unknown | 1 |
| Fanny Angelika Manullang | Affiliation unknown | 1 |
| Friska Mawira Manullang | Affiliation unknown | 1 |
| Widya Patricia Utama Nahampun | Affiliation unknown | 1 |
Affiliations come from OpenAlex; journal OAI-PMH metadata carries none. Authors without an OpenAlex ID are matched by name, which can merge or split people.