# Data-Driven Approaches for Predicting and Forecasting Air Quality in Urban Areas
## 2 Materials and Methods
### DL Custom-Made Algorithms for AQI
Regarding the parameters, the important ones are the neurons connections weights (for instance, for the first dense layer) weight shape is (64, 128) with the corresponding weights matrix ([[0.09693588, 0.11530785, 0.04327405, \(\ldots\), \(-\)0.01015339, \(-\)0.00465284, \(-\)0.16290204], \(\ldots\), [0.18151447, \(-\)0.00127745, 0.11786038, \(\ldots\), \(-\)0.06098074, 0.0883746, \(-\)0.14132085]) and bias shape (for the same first dense layer) that is (128), with the corresponding bias array [0.01425829, \(-\)0.019097, 0.02077781, 0.05533804, \(-\)0.02579543, \(-\)0.05466483, \(\ldots\), 0.03854505, \(-\)0.08813311, \(-\)0.0760707, 0.03319431, \(-\)0.03673444, \(-\)0.02343925, \(-\)0.01249062, \(-\)0.04072443]. * Time-Delay Neural Networks (TDNNs) are designed to process temporal data by incorporating delays in the input layer. This architecture allows TDNNs to adapt unstructured data speech recognition, image processing, and time series analysis [92]. In this case, the hyperparameters that define the TDNN architecture are an input layer (the input shape that is determined by the number of the time step and the number of features in the training data), five hidden layers (dense ones, first one with 64 units, second one with 128 units, the third and the fourth one with 256 units, and the fifth one with 64 units, each one using ReLu-type activation function), a dropout layer to prevent overfitting (dropout rate of 0.2), a flatten layer used to convert the output of the last dense layer to a one-dimensional vector necessary for the output layer and, one output layer with just one unit (a dense one). Other hyperparameters are the same and with the same values as in the case of FNNs, TCNs, RNNs, LSTMs, and GRNNs, to which it is added the number of time steps (_time_steps_) that was set to 4. Regarding the model parameters, for instance, for the first dense layer, the weights of the shape are (64, 128) with the associated matrix weights ([[\(-\)0.18985237, \(-\)0.23790528, \(-\)0.26162702, \(\ldots\), \(-\)0.21098962, \(-\)0.34780186, 0.00897838], \(\ldots\), [0.23329817, \(-\)0.03779398, 0.  
of FNNs, TCNs, RNNs, LSTMs, and GRNNs, to which added the data autoencoders encoding dimensions that are [1024, 64, 512, 32], the autoencoders training (number of epochs for autoencoders training was set to 50, batch size 32 and, the validation split was set to 0.1). Regarding the model parameters, for instance, for the second layer (first encoder layer of the autoencoder) the weights shape is (1024, 64) with the corresponding matrix weights [[\(-0.01099487\), \(0.05026998\), \(-0.04905977\), \(\ldots\), \(-0.06741306\), \(0.15472981\), \(-0.25435853\)], \(\ldots\), \([-0.04147308\), \(-0.02906811\), \(-0.00823338\), \(\ldots\), \(-0.05285922\), \(-0.1270246\), \(-0.180068\) ]] and biases shape is (64) with the corresponding bias vector [\(-0.02391353\), \(-0.0217452\), \(-0.02374031\), \(-0.02275715\), \(-0.00915561\), \(-0.02361129\), \(\ldots\), \(-0.02615629\), \(-0.0149049\), \(-0.0102234\), \(-0.08077513\)]. Table 2 contains the tuning hyperparameters/parameters for DL-tailored models. In the case of these neural network models, the comparative analysis is conducted on the same metrics, such as \(R^{2}\), _MAE_, _MAPE_, and _MedAE_. Comparing the performance of different models will facilitate the selection of the most suitable model for addressing AQ issues.