# A Short-Term Forecast Model of foF2 Based on Elman Neural Network
## 4 Discussion  
The IPSO-ENN model constructed in this paper has five layers, which are one input layer, three hidden layers and one output layer. The input layer has nine neurons, corresponding to nine inputs. The three hidden layers contain eleven, nine and seven neurons, respectively. The output layer has one neuron that represents the predicted value of foF2. The ENN model, which is trained by BP algorithm, and the BPNN model are chosen as the comparison of the IPSO-RNN model. Both the ENN model and the BPNN model are generated by Matlab neural network toolbox and have the same configuration as the IPSO-ENN model. The data of Wuhan Station in 2014 and 2016 are used to test the forecasting ability of all models. 2014 is the high year of solar activity, while 2016 is the low year of solar activity. The RMSE and relative error (RE) are used to evaluate the prediction results of foF2. The RE formula is as follows:  
\[RE=\frac{1}{N}\sum_{n=1}^{N}\frac{\left|y-f_{o}\right|}{f_{o}}\times 100 \tag{16}\]  
where \(N\) is the number of input samples, \(f_{o}\) is the observed value and \(y\) is the predicted value. The prediction results are shown in Table 2. As can be seen from the table, the ENN model has the smaller RMSE than the BPNN model, regardless of whether the solar activity is high or low. After using the IPSO algorithm to optimize the ENN model, the RMSE of the ENN model is further reduced. Specifically, the RMSE of the ENN model is reduced by about 4.30% compared with the BPNN model, and the RMSE of the IPSO-ENN model is reduced by about 8.92% compared with the ENN model. The RMSE in 2014 is larger than that in 2016, suggesting that it is more difficult to predict foF2 in high solar years. However, the RE in 2014 is smaller than that in 2016. This is because foF2 is larger in high solar years. Figure 3: RMSE of ENN model under different combination of hidden layers. Figure 4 shows statistical histogram of the absolute error (AE) between measured foF2 and foF2 obtained from the IPSO-ENN model, the ENN model and the BPNN model. The AE formula is as follows:  
\[AE=f_{p}-f_{o} \tag{17}\]  
The top panel contains histograms for 2014 and the bottom panel contains histograms for 2016. A careful check of these histograms shows that the IPSO-ENN model has the largest AE peak and the most concentrated distribution, both in 2014 and 2016. For example, in 2014, 57.99% of AE are distributed between [\(-\)0.5,0.5] and 84.82% of AE are distributed between [\(-\)1,1] for the IPSO-ENN model. For ENN model and BPNN, the two ratios are 51.73% and 81.4% and 50.2% and 79.65%, respectively. Combining the above contents, we can find that the annual prediction of foF2 by IPSO-ENN model is more accurate, compared with the ENN model and the BPNN model. Figure 5 shows the RMSE of each month in 2014 and 2016. It can be seen that the trend of monthly RMSE of the three models is basically the same and the IPSO-ENN model has the smallest RMSE in every month, which indicates that the IPSO-ENN model is more accurate for the prediction of foF2 in a single month. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**YEAR**} & \multicolumn{2}{c}{**Annual**} & \multirow{2}{*}{**IPSO-ENN**} & \multicolumn{2}{c}{**ENN**} & \multicolumn{2}{c}{**BPNN**} \\ \cline{3-8}  & **Average** & & & & & & \\ \cline{2-8}  & **foF2/MHz** & **RMSE/MHz** & **RE/\%** & **RMSE/MHz** & **RE/\%** & **RMSE/MHz** & **RE/\%** \\ \hline
2014 & 8.19 & 0.75 & 7.58 & 0.81 & 8.53 & 0.85 & 8.66 \\
2016 & 6.24 & 0.68 & 8.58 & 0.76 & 10.03 & 0.79 & 10.20 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Forecast error. IPSO: improved particle swarm optimization; ENN: Elman neural network; BPNN: back-propagation neural network. Figure 4: The comparison of absolute error (AE) histograms. (**a**) AE histograms of the three models in 2014; (**b**) AE histograms of the three models in 2016. A further analysis was performed by investigating the predictability of foF2 diurnal variability.