## 6 Results and Discussion: Forecasting Performance
As stated in Table 5, we obtained the lower RMSE averaged between the 12 predictions (\(\overline{\text{RMSE}}\)) using RF as a foresight algorithm with the RF dataset (\(\overline{\text{RMSE}}\) = 18.54 mg/dL) and in an average of the FS technique, the best performance is obtained using SVM as predictive technique (\(\overline{\text{RMSE}}\) = 20.58 mg/dL) but we have to note that the better performances are located on the early predictions (5, 10, 15 min), and then they rise. Figure 2 shows the evolution of the accuracy per forecasting algorithm with the different FS approaches. In relation to Figure 2, we can observe how LR as a forecasting technique (upper left) offers an adequate behavior, but mainly in low PHs (5 or 10 min). Later, the error goes up for a further PH. It can be seen how the application of a variable selection method means a general improvement in performance, in light of the differences between the \"no FS\" line and the others. This difference in performance according to FS technique is also observed in the RF predictive technique (above right). RF stands out as the best approach to select variables. In this case, RF as a forecasting technique generates good short-term accuracy, and in the long term it stabilizes at a value that may be acceptable under the best selective techniques. SVM as a predictive algorithm (bottom left) presents an excellent performance at near PHs but in the long term it rises in a linear fashion. Again, it is observed how the selection of variables is necessary to reduce the error, but not all the techniques used result in a similar behavior. Lightweight RF as FS provides the best result. GP shows the worst performance in terms of the prediction algorithm. The variability, according to the selection technique, is wide, the worst precision being when not using variable selection and the best when RF is used for this task. Figure 1: Example of training stage with RF algorithm of the subset RF from patient \({}^{\prime}01^{\prime}\) for a 60 min PH glycemia prediction. Red, real data of glycaemia; Blue, modeled data. \begin{table}
\begin{tabular}{c c c c c c c c c c c c c c c} \hline \hline  & & & & & & & & & & & & & & & & & \\ \hline
**Subset FS** & **5** & **10** & **15** & **20** & **25** & **30** & **35** & **40** & **45** & **50** & **55** & **60** & **RMSE** & **Stnd Dev. ** \\ \hline \multicolumn{13}{c}{_Forecasting technique: LR_} \\ \hline No F.S. & 9.32 & 15.15 & 18.94 & 22.72 & 26.23 & 29.30 & 31.26 & 33.33 & 35.48 & 37.69 & 40.03 &  
In general, according to the mean values in Table 5, SVM is the best forecasting technique with an RMSE value of 20.58 mg/dL (considering all the FS techniques employed), and the best FS algorithm is RF. The latter (RF as the best FS technique) can be seen in the four predictive cases. It is also worth noting that the selection of variables always improves accuracy, and in some cases the technique itself can provide significant differences. Additionally, it is necessary to show that, for very short PHs, SVM works very well, but more broadly, RF could be a more balanced option. Variations in the error values at each step between the various 25 patients (standard deviation) are generally contained and do not present large variations between methods. Figure 3 shows an example of how that prediction behaves at 60 min (12 steps). As can be seen, the blue line (prediction) follows the red line (actual data) quite closely, although the error increases at situations of variation. This does not happen under situations of glycemic stability. Therefore, the patient's own control will influence the accuracy of the prediction. For this reason the predictions have been made with a CV method which has foreseen all types of real situations (stability and oscillations) throughout the days of monitoring of each subject. Figure 2: Test stage. RMSE up to 12-step glycemia forecasting. Averaged results of 25 subjects. Upper left, LR. Upper right, RF. Lower left, SVM. Lower right, GP. F.S.