# Data-Driven Approaches for Predicting and Forecasting Air Quality in Urban Areas
## 2 Materials and Methods
### DL Custom-Made Algorithms for AQI
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multicolumn{2}{c}{**Hyperparame-**} & \multicolumn{1}{c}{**FNNs**} & \multicolumn{1}{c}{**TCNs**} & \multicolumn{1}{c}{**RNNs**} & \multicolumn{1}{c}{**LSTMs**} & \multicolumn{1}{c}{**GRNNs**} & \multicolumn{1}{c}{**TDNNs**} & \multicolumn{1}{c}{**DBNs**} \\ \hline \multirow{4}{*}{Layers number} & 9 (Dense); & 8 (Conv1D); & 3 (Sim- & & & & 4 encoders \\  & 1 (Dropout); & 1 (Dropout); & pleRNNs); & 2 (LSTM); & 5 (Dense); & 5 (Dense); & (dense); \\  & 1 (Dropout); & 1 (Flatten); & 1 (Dropout); & 2 (Dropout); & 1 (Dropout); & 1(Dropout); & 1 (Dropout); & 1 decoder \\  & & 1 (Platten); & 1 (Dropout); & & 2 (Dropout); & 1 (Dropout); & 1 (Platten); & (dense) \\  & & & & & & & 1 (Dropout); \\ Input layer & 1 (Dense) & 1 (Conv1D  
To establish a unified metric for evaluating the algorithms' performance, we propose the formula shown in Equation (2), where the \(R^{2}\) parameter is assigned a weight of 40%, _MAPE_ 30%, and both _MAE_ and _MedAE_ are weighted at 15% each. \[OP_{k}=0.4\times R_{k}^{2}+0.3\times(1-MAPE_{k})+0.15\times(1-MAE_{k})+0.15 \times(1-MedAE_{k}) \tag{2}\]  
where \(OP_{k}\)--the unified comparing measure for the algorithm, \(k\), representing the overall precision;  
\(R_{k}^{2}\)--the coefficient of the algorithm, \(k\), should approach 1 for the perfect performance;  
\(MAPE_{k}\), \(MAE_{k}\), \(MedAE_{k}\)--the error metrics for algorithm \(k\) that should be as close to 0 as possible. \(R^{2}\) is highly important (40%) as it comprehensively measures how well the model explains the data variance. _MAPE_ (30%) is prioritized for its focus on the percentage-based error, which helps in understanding relative prediction errors across different scales. _MAE_ and _MedAE_ (15% each) contribute by offering insights into the absolute errors of the model in handling outliers. These metrics provide a balanced and multi-dimensional model performance evaluation, ensuring accuracy. Initially, we analyzed the possibility of distributing the weights equally, but the metrics are not equally relevant in analyzing the model's performance. For this reason, we assigned the highest percentage to the parameter that illustrates the direct performance of the model without significantly diminishing the importance of the other parameters, namely 40%. Subsequently, the remaining 60% could have been distributed evenly, but again, the parameters are not equally important. Therefore, we assigned 30% to _MAPE_ because it provides valuable context for deviations in prediction accuracy. Finally, the remaining 30% was distributed evenly between _MAE_ and _MedAE_, as both parameters analyze extreme deviations and potential outliers. We did not consider these two parameters as important as \(R^{2}\) or _MAPE_ because they play a complementary role in the model analysis. In summary, the authors acknowledge the empirical nature of these values and agree that better weight distributions may exist. However, the proposed 40:30:15:15 ratio was considered a starting point for this research.