## 3 Results
### Machine Learning: Results
This happens for each of the twelve counties of interest, except for one (line 10). ```
1:Input: time series with pollution levels and infection threshold exceedances per county
2:Output: predictions accuracy on the COVID-19 infections per each county
3:begin
4:results = []
5:for each county in counties do
6:input_train = in_data[!county]
7:output_train = out_data[county]
8:input_validation = in_data[county]
9:output_validation = out_data[county]
10:model.train(input_train, output_train)
11:output_pred = model.test(input_validation)
12:results.append(f1_score(output_result, output_validation)
13:endfor
14:end
```  
**Algorithm 2** Training and (county) cross validation algorithm. Upon completion of this training activity, the series of the pollutant values, relative to that county that was left out from the previous training activity, are shown to our trained algorithms. At that point, our algorithms are asked to make their prediction on the number of expected COVID-19 infections threshold exceedances, for that given county (line 11). The process ends with a comparison between that prediction and the real data, along with the consequent computation of the correspondent accuracy (line 12). Obviously, this process is iterated over the whole set of the twelve countries of interest (line 5). To conclude this discussion about using our ML-based procedure, it is time to communicate which hyperparameters were chosen and/or what kind of optimization techniques were used to tune our ML algorithms. We report all this information in Table 5, being it crucial for the reproducibility of the results, for their interpretation, and for understanding the relationships learned and exploited by our algorithms. The reader could note that the only parameter which is not present in the Table is the one regarding the _lag_ value, because it has been discussed at length, before. Table 6 shows all the 48 values of the accuracy of the predictions returned by our algorithms are reported, given in terms of the F1-score metric. Except for just one case (Nassau/SVC, highlighted in red), we have obtained 47 excellent F1-score values, all exceeding the value of 0.7. This both for those counties comprised in (or closer to) NYC, and also for those counties that are further away from the city. In Table 6, we have also reported the mean F1-score, respectively computed, averaging both on the 12 counties and on the 4 algorithms. If we look at the average F1-scores for the counties comprised in (or near to) New York City, they range from 0.84 to 0.89, while average values from 0.87 to 0.95 were returned for those counties that are further away from NYC (i.e., Onondaga, Oneida, and Monroe). \begin{table}
\begin{tabular}{c c c} \hline \hline
**Algorithm** & **Hyper-Parameters** & **Value** \\ \hline \multirow{2}{*}{KNN} & N Neighbors & 5 \\  & Weights & Uniform \\ \hline \multirow{4}{*}{SVC} & C & 1 \\  & Kernel & RBF \\  & Degree & 3 \\  & Gamma & 1/8 \\ \hline \multirow{4}{*}{MLP} & Hidden Layer & 1 \\  & Hidden Layer size & 100 \\  & Max Epochs & 500 \\  & Activation Function & ReLU \\  & Optimization Algorithm & Adam \\  & Batch Size & 16 \\  & Learning Rate & 0.001 \\ \hline \multirow{4}{*}{ET} & N Estimators & 50 \\  & Criterion & Gini \\ \cline{1-1}  & Min Samples Split & 2 \\ \cline{1-1}  & Min Samples Leaf & 1 \\ \cline{1-1}  & Max Features & \(\sqrt{8}\) \\ \cline{1-1}  & Bootstrap & False \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Machine learning (ML) algorithms: Hyperparameters optimization. Obviously, the rationale here is that the more precise the predictions, the more confidently we can consider our correlation hypothesis as confirmed.