# Greenhouse Temperature Prediction Based on Time-Series Features and LightGBM
## 5 Results and Analysis
### Analysis of Results
Statistical analysis of the results in Figure 14 shows that the mean value and standard deviation of the absolute error were 0.5901 and 0.6148 \({}^{\circ}\)C for the original features only and 0.5749 and 0.5867 \({}^{\circ}\)C for the time-series features also. The accuracy of the prediction results and the fluctuation of errors were worse for the RBF model than the previous models. The prediction results and absolute errors of the MLP model are shown in Figures 15 and 16. Statistical analysis of the results in Figure 16 showed that the maximum, mean, and standard deviation of the absolute error were 3.3944, 0.5229, and 0.6028 \({}^{\circ}\)C, respectively, for the original features only, and 3.2793, 0.5141, and 0.5583 \({}^{\circ}\)C, respectively, for the time-series features also. In the same way, when time-series features were added to the MLP model, not only the mean absolute error of the prediction results but also the fluctuation of the error decreased. Table 3 compares the prediction of each model before and after adding the time-series features against the real value and presents a simple statistical analysis of the absolute error of each model. \begin{table}
\begin{tabular}{l c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multirow{2}{*}{**Indicators**} & \multirow{2}{*}{**Without Time-Series Features**} & \multicolumn{4}{c}{**With Time-Series Features**} \\ \cline{2-6}  & & **Max** & **Mean** & **SD** & **Max** & **Mean** & **SD** \\ \hline
**LightGBM** & **3.0942** & **0.5177** & **0.5652** & **2.7378** & **0.4491** & **0.5259** \\ BP & 3.2832 & 0.5852 & 0.6146 & 3.1263 & 0.5617 & 0.5640 \\ SVM & 3.0594 & 0.5111 & 0.5374 & 3.1045 & 0.4917 & 0.5476 \\ Linear Regression & 3.1440 & 0.4988 & 0.5414 & 3.2217 & 0.5030 & 0.5732 \\ RBF & 3.2983 & 0.5901 & 0.6148 & 3.0887 & 0.5749 & 0.5867 \\ MLP & 3.3944 & 0.5229 & 0.6028 & 3.2793 & 0.5141 & 0.5583 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Statistical analysis of the absolute error with and without time-series features. Table 3 shows that LightGBM saw the most obvious improvement after the addition of time-series features. Not only the maximum error but also the mean error and the standard deviation of the error in the prediction results were the smallest. Therefore, in general, LightGBM made the best and most stable predictions among the models. Figures 5-16 compared the prediction results of each model at each time point with the real results. Good and poor results were intuitively seen in all the predictions. We conducted a quantitative analysis of the prediction results of each model. Using Equations (15)-(17), blocked cross-verification was adopted to adjust the hyperparameters of each model, and all models were trained with the optimal parameters obtained by verification. The evaluation indicators of the prediction results of each model with and without time-series features are presented in Table 4.  
Table 4 shows that all indicators were best for linear regression before time-series features were involved, followed by the SVM model and the RBF model. After adding time-series features, the indicators of the LightGBM model were the best, whereas those of the RBF model remained the worst. However, the MSE was reduced by 7.10%, the MAE was reduced by 2.58%, and the R2_Score was reduced by 0.22% with the inclusion of time-series features for the RBF model. A comparison of the indicators before and after the inclusion of time-series features in all models revealed that, for the prediction results with time-series features, except those of the linear regression model, the indicators have improved. Among them, the indicators of the LightGBM model improved the most, with the MSE decreasing by 18.60%, the MAE decreasing by 13.25%, and the R2_score increasing by 0.45%. All indicators of LightGBM were the best among the several models. This is because the LightGBM model is based on the decision tree model, and the result is the average result after the accumulation of multiple tree models.