## 4 Results and Discussions  
### LSTM Structure Optimization  
To validate the effectiveness of the proposed model, hourly PM2.5 data of 30 stations in California were collected. After the data were preprocessed, they were input into the model. However, before that, parameters of the model need to be optimized at first. For illustration purpose, monitoring station 11 is used as an example. It contains 17,544 records of PM2.5 concentrations; 70% of its data are used as training samples while the remained 30% are used as testing samples. The number of samples relies on the largest time lag value. If time lag is 12, then there will have 12,272 training samples, and 5260 testing samples. Note that the calculated optimization results in the following paper are all based on the performance from the testing set.  
Before applying the proposed model on further experiments, its parameters need to be identified and optimized for a better result. Although this study designed an STF layer into the LSTM network, some parameters of the deep neural network setting can be re-used. Following the study of [PERSON] et al., [42], this paper sets the epoch and batch size as 1000 and 48, respectively. MSE is selected as the loss function, and RMSprop is adopted as the optimizer. The learning rate of the model is set as 0.001. The number of fully connected layer is set as 1. The number of neurons of fully connected layer is set as 64. The linear active function is used. The number of neurons of output layer is set as 1. The discussion on the largest time lag of STF layer and \(\rho_{\text{threshold}}\) will be introduced in later sections, and we pre-set them as 12 and 0.4 first.  
The most important parameters that need to be tuned before model implementation is the structure of the stacked LSTM layer. The optimization performance is evaluated using root mean square error (RMSE), mean absolute error (MAE), and R\({}^{2}\). Calculations of the three metrics are presented in Equations (14), (15) and (16), respectively.  
\[\text{RMSE}=\sqrt{\frac{1}{\text{N}}\sum_{i=1}^{\text{N}}\left(\text{y}_{ \text{true}}^{\text{i}}-\text{y}_{\text{pred}}^{\text{i}}\right)^{2}} \tag{14}\]\[\text{MAE}=\frac{1}{\text{N}}\sum_{i=1}^{\text{N}}\left|y_{\text{true}}^{\text{i}}- y_{\text{pred}}^{\text{i}}\right| \tag{15}\] \[\text{R}^{2}=1-\frac{\sum_{i=1}^{\text{N}}\left(y_{\text{true}}^{ \text{i}}-y_{\text{pred}}^{\text{i}}\right)^{2}}{\sum_{i=1}^{\text{N}}\left(y_{ \text{true}}^{\text{i}}-y_{\text{mean}}^{\text{true}}\right)^{2}} \tag{16}\]  
where N represents the number of samples, \(y_{\text{true}}^{\text{i}}\) represents the true value of the \(i\)th sample, \(y_{\text{pred}}^{\text{i}}\) represents the predicted value of the \(i\)th sample, and \(y_{\text{mean}}^{\text{true}}\) represents the mean value of true values.  
The number of neurons in each LSTM layer is set as the same. Candidates of the number of LSTM layers narrowed down to [2; 3; 4] after a trial and error process, and the number of neurons at each layer was set as [32; 64; 128]. Optimization results are shown in Table 2. It can be observed that when the number of LSTM layers is 2 and the number of neurons of each layer is 64, the model has the lowest scores of RMSE and MAE and the highest score of \(\text{R}^{2}\). Therefore, this paper sets the number of LSTM layers as 2 and the number of neurons as 64.