# A Comparative Analysis for Air Quality Estimation from Traffic and Meteorological Data
## 3 Results
Observing the global AQI results, presented in the penultimate column, we can observe the same result degradation caused by the bad \(PM_{10}\) estimates generated by some estimators. For this very reason, we introduced a last column identified with \(CAQI^{*}\) that presents the same global CAQI calculations, excluding the last pollutant, specifically \(CAQI^{*}=max(I_{\text{NO}_{2}},I_{\text{O}_{3}})\). Despite its lack of practical use, this external measure allows for better assessments of the information loss (or gain) brought by the additional pollutant. From this last column it is possible to observe that, in the vast majority of the combinations, a decent AQI estimation is possible, within limits. Moreoever, the introduction of a lagged interval can be beneficial in some cases, especially for sequence-based solutions such as LSTM. Nevertheless, as already verified within the regression problem, a window size of 24 is sufficient to raise the estimates by a 0.2 margin in terms of F1-score. On the other hand, standard machine learning models do not benefit as much from the introduction of lagged features, since for instance the RF solution can perform equally well in all the three interval setups. Both the linear model on \(w=24\) and the LSTM on \(w=48\) obtain very good CAQI estimates around 0.8, thanks to better performances over the single pollutants, but most importantly thanks to better estimations over \(PM_{10}\). Comparing the global score to the adjusted AQI, we can see that the absence of \(I_{PM_{10}}\) drastically reduces the results. The confusion matrices derived by these two solutions are reported in Figure 5 (linear and LSTM indicated by \(a\) and \(b\) respectively), together with an ensemble solution (c): this last configuration was achieved by selecting the best regressors over each pollutant. Specifically, we selected the RF regressor with 48-h configuration for \(I_{\text{NO}_{2}}\), the LSTM with -hour configuration for \(I_{\text{O}_{3}}\) and lastly the linear model over 24-hour period as estimator for \(I_{PM_{10}}\). This last ensemble allowed us to achieve a total F1-score \(=0.8388\), surpassing the single-model solutions achieved so far. In order to justify the extreme disparity between these higher scores and the extremely low estimates achieved in some cases, we note that the AQI results are strongly influenced by factors: (i) the air quality thresholds in Table 5 are not equally spaced, but the intervals between categories become wider with the increase of the pollutant measurements; (ii) the computed AQI presents a decreasing granularity and inherent class imbalance; in particular, the first levels are represented by a small fraction of samples, while higher levels contain the majority of the data points. This is clearly visible in the confusion matrices, where the AQI level 4 (_Highrisk_) contains more than 3000 instances. Figure 5: CAQI Confusion matrices of the best models, specifically **(a)** the linear model (LinBR, w = 24), **(b)** the LSTM model (LSTM, w = 48) and **(c)** an “ensemble” result, given by using the best predictors for each pollutant: RF for \(NO_{2}\), LSTM for \(O_{3}\), LinBR for \(PM_{10}\).