## 4 Results and Discussion
### AQI Prediction Model  
Table 3 specifies the design of the parameters used to generate the prediction models for all dataset (Zhongli, Changhua, and Fengshan). Note that each particular constant for each dataset supposedly contains three values. However, to ease the documentation, any similar value being used across all datasets or at least across different time steps will be written only once. For example, Changhua dataset which uses the number of trees (i.e., 100) in AdaBoost for all time step categories. Additionally, parameter \(m\) in the random forest has only one value in all models. To be able to evaluate the ability of each model in accomplishing the task, 80% of data points will be fed into each training process, while the remaining 20% are spared for the testing purpose. Figure 6: Composition of AQI classes in Changhua: (**a**) Month-based; (**b**) Year-based and Overall-based. Figure 7: Composition of AQI classes in Fengshan: (**a**) Month-based; (**b**) Year-based and Overall-based. Table 4 describes the evaluation results of Zhongli F1-AQI prediction using 5 methods with and without imputation. It can be inferred that machine learning algorithms performed very well in predicting future AQI levels in Zhongli for the following hour. The linear kernel is shown to be the best input transformation technique for SVM, with \(R^{2}\) results of 0.953 (without imputation) and 0.963 (with imputation). Imputation allows SVM to produce improvement in all evaluation metrics. Furthermore, in terms of MAE score, SVM-RBF outperforms SVM-Linear, but the opposite is true for the RMSE score. This may be due to RBF having more samples with a larger prediction error despite a smaller average error (larger errors produce a greater penalty for RMSE). The performance of random forest, AdaBoost, ANN, and stacking ensemble algorithm are all comparable. Random forest and stacking ensemble algorithm obtain slightly better \(R^{2}\) performance (0.001). Unlike with SVM, imputation does not affect the prediction results for AdaBoost, random forest or the stacking ensemble algorithm, indicating their robustness to missing data. On the other hand, imputation only provides a small degree of improvement on ANN, resulting in tied \(R^{2}\) values with AdaBoost. Several loss regression functions (square, linear, exponential) are tested on AdaBoost but without a decisive performance outcome due to efforts to avoid bias since the interpretation could be distorted by randomness, especially given very minor degrees of difference. Table 5 summarizes the results for the 8-h Zhongli AQI prediction. The \(R^{2}\) value of 0.764 is the best value obtained by the stacking ensemble method. Nonetheless, the performance of SVM becomes worse with an \(R^{2}\) value less than 0.6 across all kernels. The values of MAE and RMSE are 17 and 23, \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Method**} & \multicolumn{4}{c}{**Without Imputation**} & \multicolumn{4}{c}{**With Imputation**} \\ \cline{2-7}  & **RMSE** & **MAE** & \(\mathbf{R^{2}}\) & **RMSE** & **MAE** & \(\mathbf{R^{2}}\) \\ \hline SVM-Polynomial & 9.836 & 8.275 & 0.923 & 8.145 & 6.827 & 0.947 \\ SVM-RBF & 9.298 & 5.119 & 0.931 & 8.832 & 4.617 & 0.938 \\ SVM-Linear & 7.659 & 6.050 & 0.953 & 6.790 & 5.217 & 0.963 \\ Random Forest & 3.255 & 2.208 & 0.992 & 3.257 & 2.207 & 0.992 \\ AdaBoost-Square & 3.291 & 2.187 & 0.991 & 3.337 & 2.185 & 0.991 \\ AdaBoost-Linear & 3.328 & 2.191 & 0.991 & 3.308 & 2.189 & 0.991 \\ AdaBoost-Exponential & 3.336 & 2.193 & 0.991 & 3.327 & 2.193 & 0.991 \\ ANN & 3.572 & 2.438 & 0.990 & 3.378 & 2.396 & 0.991 \\ Stacking Ensemble & 3.236 & 2.196 & 0.992 & 3.243 & 2.199 & 0.992 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Results of ML Algorithms for Zhongli F1-AQI Prediction.