# Fast Optimization of the Installation Position of 5G-R Antenna on the Train Roof
## 3 A Fast Prediction Model for the Coupling Coefficient
### Prediction Results and Errors  
#### 3.6.1 Prediction Results and Errors of MNN1 Prediction Model  
In this paper, the MSE, mean absolute error (MAE), and relative prediction error (PRE) are used to judge the prediction accuracy. The MAE and PRE are shown in Equations (2) and (3), respectively. The \(MAE\) represents the consistency of the prediction results, and the smaller the value, the smaller the prediction deviation:  
\[MAE=\frac{\sum_{i=1}^{N}\left|S_{i}^{\prime}-S_{i}\right|}{N} \tag{2}\]  
\[PRE=\left|\frac{S_{i}^{\prime}-S_{i}}{S_{i}}\right|\times 100\% \tag{3}\]  
where \(N\) represents the number of coupling coefficients, and \(S_{i}^{\prime}\)and \(S_{i}\) represent the predicted value and expected value of the coupling coefficient of the port when the roof antenna is located at the \(i\)-th position, respectively. Figure 7: Structure of the proposed MMNN prediction model. In order to meet the inherent needs of the prediction model, the input and output data should be normalized and anti-normalized; that is, before running the prediction model, the data should be normalized within the range of [0, 1]. The number of neurons in the hidden layer (HL) of the BPNN model was determined by the trial-and-error method. The calculation results showed that, when the number of neurons was 3, the prediction error was small. Therefore, the topology of the BPNN is 3-3-1, and the transfer functions of the HL and OL adopt the Tansig function and Purelin function, respectively. The maximum training times are 200, the minimum error of the training target is 0.0001, and the learning rate is 0.1. The size of the MEA population was 200, the number of subpopulations was 20, the number of superior subpopulations and temporary subpopulations were both 5, and the number of iterations was 10. In addition, in order to improve the reliability of the prediction results, all prediction models in this paper will be simulated for 10 consecutive times, and the average value of the 10 prediction results will be taken as the final result, as shown in Table 5.  
As can be seen from Table 5, when X \(\leq\) 3 m, the \(\text{PER}_{\text{Max}}\) of sub-neural network 1 (Sub-NN1) and sub-neural network 2 (Sub-NN2) is 0.28% and 0.31%, respectively, and the other two performance indices are similar. However, sub-neural network 1 does not need to apply the MEA, and the structure of the prediction model is simpler, so the engineering practicability is better. In addition, among the 10 predictions, sub-neural network 3 has a higher prediction accuracy for two times, which is because the optimization algorithm sometimes gives poor initial parameters compared with the initial parameters generated randomly, which is not uncommon in the application of optimization algorithms [21]. When 3 m \(<\) X \(\leq\) 14 m, the \(\text{RPE}_{\text{Max}}\) of sub-neural network 1 and sub-neural network 2 are 1.90% and 0.33%, respectively, and the other two prediction performance indices of sub-neural network 2 are also smaller; that is, the prediction accuracy is better, which reflects the role of the optimization algorithm MEA. Therefore, in MNN1, X = 3 m is taken as the dividing line, and the integration strategy is set as, when X \(\leq\) 3 m, the prediction model based on sub-neural network 1 is used for prediction, and, when X \(>\) 3 m, the prediction model based on sub-neural network 2 is used for prediction, and the two outputs are optimized to obtain the prediction result of MNN1. The prediction results of the MNN1 prediction model are shown in Figure 8.  
The comparison of the MNN1 prediction results based on the X direction of the horizontal co-ordinate is shown in Figure 8a, and the corresponding PRE is shown in Figure 8b. In order to present the prediction results clearly, only 25 coupling coefficients are randomly selected in the figure. From Figure 8, it can be seen that, when X \(\leq\) 14 m, the predicted value and expected value of the MNN1 prediction model are relatively close, indicating that the prediction accuracy of MNN1 is high.