*4.1. Evaluation*

This research is a simulation experiment of realizing the prediction model based on Python-TensorFlow framework.

In order to reflect the prediction accuracy of the haze prediction model at different levels, we used numerical evaluation and hierarchical evaluation. We used the root-meansquare error (RMSE) [35] as a numerical evaluation method to reflect the overall accuracy of the model's haze prediction values, as shown in (10).

$$RMSE = \sqrt{\frac{1}{m} \sum\_{i}^{m} (T\_i - P\_i)^2} \tag{10}$$

In (10), *i* refers to the number of a test sample, m refers to the total number of predicted simples, *Ti* represents the actual concentration of the test sample, the ground-truth, with the unit: μg/m3, and *Pi* represents the predicted concentration value with the unit: μg/m3.

We divided the PM2.5 and PM10 concentrations into six grades based on the Air Quality Index (AQI) to assess the model's error in macroscopic pollution levels, as shown in Table 2. If the prediction result and the result are at the same level, the prediction result is judged to be excellent; if the prediction result and the result are adjacent, the prediction result is determined to be acceptable; if the prediction result is different from the result by two levels or more, the predicted result is unacceptable.

**Table 2.** PM2.5 and PM10 levels.


#### *4.2. Result*

In this paper, by changing the dataset, we used the LSTM-based haze prediction model to predict the concentration of PM2.5 and PM10, respectively. The number of input layer nodes was 29, and the number of output layer nodes was 1. While predicting the PM2.5 concentration, the inputs were the PM10, O3, CO, NO2, and SO2 at the n hour and the PM2.5 concentration in the last 24 h. The output was the PM2.5 concentration at *n* hour. While predicting the PM10 concentration, the inputs were the PM2.5, O3, CO, NO2, and SO2 at the n time, and the PM10 concentration in the last 24 h. The output was the PM10 concentration at the n hour.

The initialization parameters were as follows: the weight gradient learning rate was set to 0.01, the visible layer node bias was initialized to 0.05, the hidden layer node bias was initialized to 0.1, the target error was set to 0.005, and the iteration number was 5000.

We have also conducted several experiments to study the effect of different hidden layers on prediction accuracy. In order to more directly reflect the prediction result of PM2.5/PM10 and calculate the accuracy of the experiment, we selected the prediction data and actual data of 360 consecutive moments to demonstrate. We performed five experiments on each model with different hidden layer numbers and selected the best result. The prediction results of PM2.5 concentration in different hidden layers based on the LSTM-based haze prediction model are shown in Table 3.


**Table 3.** PM2.5 prediction results with different hidden layers.

The PM2.5 prediction results show that even if the LSTM has only one hidden layer, the RMSE of the prediction result is only 10.95, which is a lower error level. Thus, the prediction level of PM2.5 is generally consistent with the actual situation, which indicates the high correlation between the input data and the concentration of PM2.5.

In fixing the number of hidden layer nodes, the prediction accuracy is related to the number of hidden layers. Therefore, the increase in the number of hidden layers generally improves the prediction accuracy of PM2.5, both at RMSE and level evaluation. However, the accuracy of the prediction result brought by the increase of the hidden layer also has a bottleneck. For example, when the hidden layer is 7, the mean square error is 8.11, the excellent is 86.39%, the acceptable is 13.61%, and the unacceptable is 0%. Figure 4 shows the PM2.5 prediction results of hidden layer 5 and hidden layer 7, respectively.

**Figure 4.** Prediction results of PM2.5 in different hidden layers of the LSTM model: (**a**) five hidden layers; (**b**) seven hidden layers.

We used the same method to predict the concentration of PM10. The predicted PM10 concentrations in different hidden layers based on the LSTM-based haze prediction model are shown in Table 4.

Increasing the number of the hidden layer can improve the prediction accuracy of PM10 to a certain extent, reducing the RMSE of the prediction result and improving the acceptability of the level prediction. For example, the haze prediction model with 7 hidden layers has the best result, where the root-mean-square error is 15.41, the excellent is 81.67%, the acceptable is 18.33%, and the unacceptable is 0%. Figure 5 shows the PM10 prediction

results of hidden layer 5 and hidden layer 7, respectively. However, the root-mean-square error value is also very close when the hidden layers are 5, 6, and 8. This shows that the improvement of hidden layers above five can hardly increase the accuracy of the predicted concentration of PM10, which is the limitation imposed by the LSTM model.


**Table 4.** PM10 prediction results with different hidden layers.

**Figure 5.** Prediction results of PM10 in different hidden layers of the LSTM model: (**a**) five hidden layers; (**b**) seven hidden layers.

Compared with Table 3, the RMSE of PM10 is always more significant than the RMSE of PM2.5. The haze prediction model also produces a more significant deviation in the PM10 level prediction. The excellent and acceptable levels are both reduced by about 5% compared to the PM2.5 level prediction. Analyzing the result accuracy of PM2.5 and PM10, we argue that the model fits well with the correlation between O3, CO, NO2, SO2, and haze pollutants and achieves accurate predictions both on haze concentration and level.
