## 3 Results
### Machine Learning: Results  
We come now to the results we got by exploiting the ML-based procedure we have adopted. As described in the previous section, we used four different ML algorithms, namely: K-Nearest Neighbor (KNN), Support Vector Classifier (SVC), Multi-Layer Perceptron (MLP), and Extra Tree (ET). Each algorithm worked with the data of the 12 counties, trying to return, for each county, a prediction that the COVID-19 daily infections would have exceeded a given threshold, in a certain day, given the values of the corresponding PM\({}_{2.5}\). Those predictions were obtained after a training phase conducted, in turn, with the data coming from all the 12 counties, except for that county subjected to the prediction, yielding a total amount of 48 different predictions (12 counties and 4 algorithms). Before we can come to the results, we think it can be informative for the reader to look at the two procedures used in our designed process with the aim, respectively: (i) To prepare the data for the learning process, and (ii) to conduct the training and (county) cross validation activities. The first procedure is shown in Algorithm 1, with its corresponding pseudocode. To better understand it, the following explanations are in order. We have a double nested iteration on both the various NY counties (line 6) and the period of interest (line 8). Within this iteration, the in_data array is prepared (lines 10-12), built on the values of the pollutant \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Start Date** & & **04/03** & \\
**(Infections)** & & & \\ \hline
**End Date** & **20/3** & **21/03** & **22/03** \\
**(Infections)** & & & \\ \hline New York & \textless{}10\({}^{-4}\) & 0.0518 & 0.0902 \\ Kings & \textless{}10\({}^{-4}\) & 0.0003 & \textless{}10\({}^{-4}\) \\ Bronx & \textless{}10\({}^{-4}\) & 0.0011 & 0.0003 \\ Queens & \textless{}10\({}^{-4}\) & 0.0002 & 0.1283 \\ Richmond & \textless{}10\({}^{-4}\) & \textless{}10\({}^{-4}\) & \textless{}10\({}^{-4}\) \\ Nassau & \textless{}10\({}^{-4}\) & \textless{}10\({}^{-4}\) & 0.0018 \\ Westchester & \textless{}10\({}^{-4}\) & \textless{}10\({}^{-4}\) & \textless{}10\({}^{-4}\) \\ Rockland & 0.0071 & 0.0 & \textless{}10\({}^{-4}\) \\ Suffolk & \textless{}10\({}^{-4}\) & \textless{}10\({}^{-4}\) & \textless{}10\({}^{-4}\) \\ Monroe & \textless{}10\({}^{-4}\) & 0.0058 & 0.001 \\ Onondaga & \textless{}10\({}^{-4}\) & \textless{}10\({}^{-4}\) & \textless{}10\({}^{-4}\) \\ Oneida & \textless{}10\({}^{-4}\) & \textless{}10\({}^{-4}\) & \textless{}10\({}^{-4}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Results of the Granger causality tests. registered in all those eight days that run from 14 to 8 days before that specific day \(X\) when we take into consideration the infections. ```
1:Input: raw data with number of infections and pollution values per county
2:Output: time series with pollution levels and infection threshold exceedances per county
3:begin
4:in_data = []
5:out_data = []
6:for each county in counties do
7:i = 0
8:for each day from 03/04 to 03/22 do
9:out_data[countly][i] = infections[countly][day] > threshold
10:in_data[countly][i] = []
11:for each lag from 0 to 7 do
12:in_data[countly][i]_append(pollution[countly][day-14+lag])
13:endfor
14:i++
15:endfor
16:endfor
17:end
```  
**Algorithm 1** Dataset preparation algorithm. To this aim, line 9 is the out_data array. Specifically, here, the program returns a boolean value. That boolean value is equal to 1 if the amount of the registered COVID-19 infections in that day X is above the infections threshold, 0 otherwise. In essence, a function is built with these infections threshold _exceedances_ (line 9). Now, it is the turn to illustrate the second procedure, reported in Algorithm 2, with its pseudocode. Here, we have another iteration (lines 5-13). Within this iteration, our algorithms are trained (after the data preparation of lines 6-9) with the pollutant values (in_data) and the infections threshold exceedances (out_data).