Melola Discovery

← Melola Discovery

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

DOI
10.15294/ujm.v14i2.27771
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-authorOrganisationJoint articles
Agung PutraAffiliation unknown2
Iffan AlifAffiliation unknown2
Destyariani Liana PutriInstitut Teknologi Kalimantan1
Muhammad Khaisar WirawanInstitut Teknologi Kalimantan1
Nurul HidayahInstitut Teknologi Kalimantan1
Siti SulemanAffiliation unknown1
Andhika Hayyu PratamaAffiliation unknown1
Fabelyn Gandryal MistipaAffiliation unknown1
Muhammad Fakhri ArdyansyahAffiliation unknown1
Hans Julio PratamaAffiliation unknown1
Fabelyn Gandryal Mistipa AvinHasanuddin University1
Siti Arifaini SulemanHasanuddin University1
Andhika Hayyu PratamaHasanuddin University1
Muhammad Fakhri ArdyansyahHasanuddin University1
Nurul HidayahHasanuddin University1
Hans Julio PratamaHasanuddin University1
Nurfadilah NurfadilahHasanuddin University1
Haris HarisUniversitas Sulawesi Barat1
Dinil QaiyimahAffiliation unknown1
Misdar AmdahAffiliation unknown1
Mulianti MuliantiAffiliation unknown1
Nasrul NasrulAffiliation unknown1
As'adi AbdullahAffiliation unknown1
Elis TambaruHasanuddin University1
Ari YuniastutiState University of Semarang1
Edi WaluyoAffiliation unknown1
Wisnu SunartoAffiliation unknown1
Sri WardaniAffiliation unknown1
Siti NurrohmahUniversity of Indonesia1
Rodia SyamwilAffiliation unknown1
Ipang SetiawanAffiliation unknown1
Sofwan IndarjoState University of Semarang1
Astri YunitaAffiliation unknown1
Mohamad MuspawiAffiliation unknown1
Firman FirmanHasanuddin University1
Arda Trisnawaty PanjaitanAffiliation unknown1
Fanny Angelika ManullangAffiliation unknown1
Friska Mawira ManullangAffiliation unknown1
Widya Patricia Utama NahampunAffiliation unknown1

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.

Metadata source: OAI-PMH (metadata jurnal) https://journal.unnes.ac.id/journals/ujm/oai, first harvested 6 Nov 2026, last seen 8 Nov 2026.
Original metadata (oai_dc)
<oai_dc:dc xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/  http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
	<dc:title xml:lang="en">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</dc:title>
	<dc:creator xml:lang="en">Nurul Hidayah</dc:creator>
	<dc:subject xml:lang="en">LSTM, GRU, Hybrid LSTM-GRU, Peramalan, Kualitas Udara</dc:subject>
	<dc:description xml:lang="en">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.</dc:description>
	<dc:publisher xml:lang="en">Universitas Negeri Semarang</dc:publisher>
	<dc:date>2025-10-31</dc:date>
	<dc:type>info:eu-repo/semantics/article</dc:type>
	<dc:type>info:eu-repo/semantics/publishedVersion</dc:type>
	<dc:type xml:lang="en">Peer-reviewed Article</dc:type>
	<dc:format>application/pdf</dc:format>
	<dc:identifier>https://journal.unnes.ac.id/journals/ujm/article/view/27771</dc:identifier>
	<dc:identifier>10.15294/ujm.v14i2.27771</dc:identifier>
	<dc:source xml:lang="en">Unnes Journal of Mathematics; Vol. 14 No. 2 (2025): Unnes Journal of Mathematics Volume 2, 2025; 29-38</dc:source>
	<dc:source>2460-5859</dc:source>
	<dc:source>2252-6943</dc:source>
	<dc:source>10.15294/ujm.v14i2</dc:source>
	<dc:language>eng</dc:language>
	<dc:relation>https://journal.unnes.ac.id/journals/ujm/article/view/27771/11860</dc:relation>
	<dc:rights xml:lang="en">Copyright (c) 2026 Unnes Journal of Mathematics</dc:rights>
</oai_dc:dc>