# Time Series Forecasting of Thermal Systems Dispatch in Legal Amazon Using Machine Learning
## 4 Results and Discussion
### Ensemble Learning Model Evaluation  
The results of the stacked ensemble learning model are presented in Table 1. Using the linear kernel function, all compared solvers had better results of error (MSE, MAE, and MAPE). The results using the polynomial kernel function were much higher, and this kernel function should be avoided for the stacked ensemble model. The best solver for this model was the SMO, which was slightly better than the other solvers considering the linear kernel function. Given the poor results of the stacked ensemble learning model, other approaches are evaluated. In Table 2, the results of the prediction performances of the boosted ensemble learning model are presented considering the same variation of structures used previously. Regarding the hyperparameters, the results of the boosted model were similar to the stacked ensemble learning model. Here, the linear kernel function was the best selection considering the error measures. However, for this model, the L1 QP is the best solver and this structure has been used further for the final assessments. In Table 3, the complete evaluation of the bagged model is presented. These results were more promising given that a MAPE of 0.073% and a coefficient of determination of 0.9752 were achieved. These results were achieved considering the SMO solver with the linear kernel function; additionally, the MSE and the MAE were better than the compared models and configurations. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Solver** & **Kernel** & **MSE** & **MAE** & **MAPE (\%)** & **R\({}^{2}\)** & **Time (s)** \\ \hline \multirow{3}{*}{ISDA} & LIN & 1.49 \(\times\)\(10^{5}\) & **1.76 \(\times\)\(10^{2}\)** & 7.03 & 0.4198 & 1.28 \\  & RBF & 3.78 \(\times\)\(10^{5}\) & 3.13 \(\times\)\(10^{2}\) & 1.32 \(\times\)\(10^{1}\) & 0.4735 & **0.65** \\  & POLY & 1.03 \(\times\)\(10^{12}\) & 1.58 \(\times\)\(10^{5}\) & 5.39 \(\times\)\(10^{3}\) & - & 40.89 \\ \hline \multirow{3}{*}{L1 QP} & LIN & 1.49 \(\times\)\(10^{5}\) & **1.76 \(\times\)\(10^{2}\)** & **7.02** & 0.4202 & 10.53 \\  & RBF & 4.06 \(\times\)\(10^{5}\) & 3.28 \(\times\)\(10^{2}\) & 1.39 \(\times\)\(10^{1}\) & **0.5812** & 12.62 \\  & POLY & 1.25 \(\times\)\(10^{9}\) & 3.67 \(\times\)\(10^{3}\) & 1.21 \(\times\)\(10^{2}\) & - & 9.33 \\ \hline \multirow{3}{*}{SMO} & LIN & **1.48 \(\times\)\(10^{5}\)** & **1.76 \(\times\)\(10^{2}\)** & **7.02** & 0.4218 & 2.70 \\  & RBF & 4.06 \(\times\)\(10^{5}\) & 3.27 \(\times\)\(10^{2}\) & 1.39 \(\times\)\(10^{1}\) & 0.5809 & 10.57 \\ \cline{1-1}  & POLY & 8.92 \(\times\)\(10^{9}\) & 1.64 \(\times\)\(10^{4}\) & 5.51 \(\times\)\(10^{2}\) & - & 95.33 \\ \hline \hline \end{tabular} Best results are in bold.  
\end{table} 
Table 1: Results of stacked ensemble learning model. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Solver** & **Kernel** & **MSE** & **MAE** & **MAPE (\%)** & **R\({}^{2}\)** & **Time (s)** \\ \hline \multirow{3}{*}{ISDA} & LIN & 1.25 \(\times\)\(10^{5}\) & 1.20 \(\times\)\(10^{2}\) & 5.50 & 0.5111 & 31.82 \\  & RBF & 4.48 \(\times\)\(10^{5}\) & 4.06 \(\times\)\(10^{2}\) & 1.94 \(\times\)\(10^{1}\) & 0.7461 & 6.74 \\  & POLY & 4.43 \(\times\)\(10^{7}\) & 2.06 \(\times\)\(10^{3}\) & 7.56 \(\times\)\(10^{1}\) & - & 1136.64 \\ \hline \multirow{3}{*}{L1 QP} & LIN & **5.19 \(\times\)\(10^{4}\)** & **1.03 \(\times\)\(10^{2}\)** & **4.96** & 0.7977 & 179.57 \\  & RBF & 4.66 \(\times\)\(10^{5}\) & 4.15 \(\times\)\(10^{2}\) & 1.98 \(\times\)\(10^{1}\) & **0.8181** & 167.07 \\  & POLY & 5.03 \(\times\)\(10^{7}\) & 1.86 \(\times\)\(10^{3}\) & 6.86 \(\times\)\(10^{1}\) & - & 214.36 \\ \hline \multirow{3}{*}{SMO} & LIN & 8.51 \(\times\)\(10^{4}\) & 1.54 \(\times\)\(10^{2}\) & 7.88 & 0.6682 & 49.58 \\  & RBF & 4.66 \(\times\)\(10^{5}\) & 4.17 \(\times\)\(10^{2}\) & 2.00 \(\times\)\(10^{1}\) & 0.8156 & **4.74** \\ \cline{1-1}  & POLY & 6.83 \(\times\)\(10^{7}\) & 2.30 \(\times\)\(10^{3}\) & 8.70 \(\times\)\(10^{1}\) & - & 1847.39 \\ \hline \hline \end{tabular} Best results are in bold.  
\end{table}