# Machine Learning Algorithm for Delay Prediction in IoT and Tactile Internet
## 6 Simulation Results
Furthermore, algorithms Trainlm and Trainbr have approximately the same performance as algorithm Traincgf; the maximum improvement, in this case, is 6.5% and 6.4%, respectively. On the other hand, algorithm Trainrp also performs poorly in this case and has the lowest prediction accuracy compared to its competitors. Figures 6-9 show the prediction models with the above training algorithms regarding the k-step prediction model used. As can be seen in Figure 6, for the k-step prediction models in the case of using Trainbr, as shown in the figure, the prediction models in the \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Training** & **Performance** & \multicolumn{2}{c}{**1-Step Prediction**} & \multicolumn{2}{c}{**10-Step Prediction**} & \multicolumn{2}{c}{**15-Step Prediction**} \\ \cline{3-8}
**Algorithm** & **Function** & **RMSE** & **MAPE** & **RMSE** & **MAPE** & **RMSE** & **MAPE** \\ \hline \hline Traincgf & & 0.1253 & 0.1149 & 0.1796 & 0.1520 & 0.1970 & 0.1580 \\ \hline Trainlm & & 0.0672 & 0.0851 & 0.2092 & 0.2935 & 2.1092 & 3.3511 \\ \hline Trainbr & & 0.0650 & 0.0549 & 0.2642 & 0.3317 & 0.1412 & 0.1033 \\ \hline Trainrp & & 0.6810 & 0.7874 & 1.2041 & 6.7734 & 2.510 & 6.6828 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The prediction accuracy for delay prediction in IoT system. case of 1-step and 15-step prediction are identical to the observed model. However, the prediction model in the case of using 10-step prediction deviates slightly from the observed model. Moreover, in all cases, we found that the resulting model increases gradually with time. Figure 6: Predicted output models based on the k-step prediction approach with respect to the Trainbr training algorithm. Figure 7: Predicted output models based on the k-step prediction approach with respect to the Traincgf training algorithm. the observed model in both the 15-step and 10-step predictions. It also deviates slightly from the observed model in the one-step prediction. The result of the ANN training performance is shown in Figures 9-11. The figures indicate the relationship between MSE (loss) and the number of epochs during the training network for the successful training due to the lowest errors in the training, validation, and testing curves. The error generally minimizes after more training epochs but may rise when the network overfits the training data in the validation dataset. By default, training terminates after six sequential increases in the validation error, and the best performance is taken in the epoch with the minimum validation error. As shown in Figure 10, when the Trainlm algorithm is used, the error decreases after more training epochs. The best validation performance is 0.0053946 at the 3 rd iteration of the training network. Nevertheless, the error in the validation dataset may increase  
Figure 11: The best validation performance in the case of using Traincgf algorithm. Figure 10: The best validation performance in the case of using Trainlm algorithm. when the network begins to overfit the training process. The training is terminated after six consecutive validation errors when the error increases. In Figure 11, the model, in this case, was trained using the training algorithm Traincgf, where the best validation performance at the 23 rd iteration is 0.025272. The error starts to rise in the validation set. The network begins to overfit the training process until the training terminates, where the training also increases after six sequential validation errors. On the other hand, Figure 12 shows that the Trainrp training algorithm has the best validation performance of 0.15745 at the 14 th iteration. There is a slight rise in the validation error as the network overfits the training process until the training ends. After six consecutive validation errors, the training is also terminated. Figure 13 shows that the best training performance at the 105 th iteration is 0.060604 when Trainbr is used.