# Research on PM2.5 Concentration Prediction Based on the CE-AGA-LSTM Model
## 4 Experiments
### Experimental Data
#### 4.2.2 Prediction of PM2.5 Concentration Based on the AGA-LSTM Prediction Model  
Based on Section 4.2.1, eight impact factors were selected using the CE method, and the new obtained dataset had 10 dimensions, i.e., PM10, NO\({}_{2}\), SO\({}_{2}\), O\({}_{3}\), PRES, TMP, HUM,  
Figure 3: CE of each pollutant factor and PM2.5. Figure 2: CE of each meteorological factor and PM2.5. WDIR, PM2.5; so, the dataset contained a total of 64,300 data records. The pattern of change of each feature at different times was further analyzed by plotting the time-series feature maps of each feature at different times, as shown in Figure 4. From Figure 4, it can be seen that each feature of the dataset had a certain periodicity. In this experiment, the input data were normalized using Equation (6) to map the values to decimals between 0, 1, and finally the dataset was processed into the data format needed for supervised learning and input into the prediction model. \[x=\frac{x-\min}{\max-\min} \tag{6}\]  
The format of each supervised learning data was: \((x_{1}\omega_{1},x_{2}\omega_{2},x_{3}\omega_{3},\cdots,x_{10})\), where the first nine dimensions are the input training data at time \(\mathrm{t}-1\) and the last dimension is the label, i.e., PM2.5 concentration at time \(\mathrm{t}\). The length of each input sequence was 24. To predict the PM2.5 concentration of the next day, data of the previous seven days were used as the model input data for prediction, and the PM2.5 concentration data of the first day after the seven days were used as the model output for the prediction. Therefore, the input data of the prediction model were 7\"24\"10, and the output data were 24\"1. The data were divided into two parts for the experiment, with 70% of them as the training set, and 30% as the test set. The number of neurons in the hidden layer, the number of training times, and the learning rate in the LSTM model were determined by AGA, and the relevant parameters of the prediction model were set as shown in Table 4. \begin{table}
\begin{tabular}{c c} \hline \hline
**Model Parameters** & **Set Value** \\ \hline Input\_size & 10 \\ Output\_size & 1 \\ hidden\_size & 32 \\ num\_layers & 2 \\ Activation function & ReLU \\ batch\_size & 60 \\ Optimization algorithm & Adam \\ lr & 0.001 \\ loss function & MSE \\ epochs & 2000 \\ dropout & 0.25 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Prediction Model-Related Parameter Settings. Figure 4: Time-series characteristics of PM2.5 concentrations at different times for each feature. To verify the feasibility and accuracy of the proposed method in this paper, nine methods of prediction models were designed for comparison tests, namely, the Linear Regression models (LR), the Support Vector Regression models (SVM), the Random forest (RF), Autoregressive Moving Average models (ARMA), the ST-LSTM model in reference [16], the direct input LSTM prediction model with all attributes (LSTM), the CE-based LSTM prediction model (CE+LSTM), the proposed method in this paper (CE+AGA-LSTM) and the CE-based RNN prediction model (CE+RNN). To evaluate the performance of the prediction models, five samples (five 7-day time series data) were randomly selected as input data to predict PM2.5 concentrations, which were measured by three metrics: MAE, RMSE and R\({}^{2}\). The three indicators were obtained from Equations (7)-(9). The results of the experimental comparison are shown in Tables 5-7. The best results are marked in bold.