## 2 Materials and Methods
### Data Collection and Preprocessing  
Before delving into the specific datasets, it is important to note that the data used in this study were collected from the automatic environmental station of the Epirus prefecture \begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & & **SlideNN (Edge Computing)** & & & \\ \hline
**Submodel** & **Input Length** & **Output Length** & **Learning Rate** & **Epochs** & **Batch Size** \\ \hline
1 & 64 & 2 & & & \\
2 & 128 & 4 & \(10^{-4}\) & 400 & 16 \\
3 & 256 & 8 & & & \\
4 & 512 & 16 & & & \\ \hline \hline \multicolumn{5}{c}{**GRU Model (Edge Computing) ***} \\ \hline
**GRU Cells** & **Input Length** & **Output Length** & **Learning Rate** & **Epochs** & **Batch Size** \\ \hline
16 & 64 & 2 & & & \\
32 & 128 & 4 & \(10^{-4}\) & 50 & 32 \\
64 & 256 & 8 & & & \\
128 & 512 & 16 & & & \\ \hline \hline \multicolumn{5}{c}{**GRU Model (Cloud Computing) **} \\ \hline
**GRU Cells** & **Input Length** & **Output Length** & **Learning Rate** & **Epochs** & **Batch Size** \\ \hline
1280 & 64 & 2 & & & \\ \hline \end{tabular}  
* All GRU configurations in the edge-case scenario used exactly two GRU layers. ** All GRU configurations in the cloud-case scenario used exactly four GRU layers.  
\end{table} 
Table 2: Overview of the hyperparameters for all models. Figure 4: GRU model configurations (strands) for the cloud case: (a) Config 1: \(64\to 2\), (b) Config 2: \(128\to 4\), (c) Config 3: \(256\to 8\), and (d) Config 4: \(512\to 16\). (district), located at the center of Ioannina city [55]. The data spanned over 3 years, starting on 15 February 2019 and ending on 20 October 2022. The primary air quality measurements originated from IoT-based particulate matter (PM) sensors installed in central urban locations of the city, specifically near Vilaras Street, adjacent to the Zosimaia School. The data were obtained from a 32-channel optical particle counter (APDA-372, Horiba Ltd., Kyoto, Japan) [56]. The instrument is reference-equivalent for PM\({}_{2.5}\) and PM\({}_{10}\) measurement according to the EN 14907 and EN 12341 standards, respectively. The sampling was conducted through a TSP sampling head equipped with a vertical sampling line, which included a particle drying system, providing mass concentrations of PM\({}_{1}\), PM\({}_{2.5}\), PM\({}_{4}\), and PM\({}_{10}\) fractions at hourly intervals. PM sensors of this station provide continuous hourly data for four types of particulate matter: PM\({}_{1}\), PM\({}_{2.5}\), PM\({}_{4}\), and PM\({}_{10}\). The instrument size measurement range was 0.18-18 \(\upmu\)m and the mass measurement range was 0-10,000 \(\upmu\)g/m\({}^{3}\), whereas the measurement range was 0-20,000 ppm/cm\({}^{3}\). Complementary hourly average values of the meteorological data, including temperature (T), relative humidity (H), wind speed (WS), and wind direction (WD), were obtained using a collocated automated weather station. Specifically, the data were recorded by a WS300-UMB Smart Weather Sensor [57], ensuring respective measurements within the ranges \(-\)50-60 \({}^{\circ}\)C and 0-100% RH, as well as respective accuracy values equal to \(\pm\)0.2 \({}^{\circ}\)C and \(\pm\)2% RH. The wind speed and wind direction values were measured by Theodor Friedrichs & Co., Schenefeld, Germany sensors with measuring ranges equal to 0-60 m/s and 360\({}^{\circ}\), respectively. The respective accuracies were equal to \(\pm\)0.3 m/s at speeds larger than 15 m/s, or 2% and \(\pm\)2.5\({}^{\circ}\) otherwise. Each hourly entry in the dataset formed an 8-dimensional feature vector constituting of (PM\({}_{1}\), PM\({}_{2.5}\), PM\({}_{4}\), PM\({}_{10}\), T, H, WS, and WD), where the PMs are the particle matter concentrations (1-10), and T, H, WS, and WD are the meteorological station measurements of the temperature, relative humidity, wind speed, and direction, respectively. These hourly vector values were then linearly interpolated to minute values, and the corresponding AQI values were calculated using the PM-interpolated minute values.