## 5 Discussion  
In this study, two supervised learning models, namely XGBoost and LSTM-RNN, were utilized to predict the internal temperature of a greenhouse up to an hour in advance. The objective was maintaining an acceptable temperature range with a hysteresis of \(\pm\)2 \({}^{\circ}\)C. The MAE metric calculated the distance between the predicted and actual values. The results indicated that the XGBoost algorithm did not meet the acceptability criterion, as the range in all stations varied between 2.3 \({}^{\circ}\)C and 2.4 \({}^{\circ}\)C, surpassing the established \(\pm\)2 \({}^{\circ}\)C hysteresis. On the other hand, LSTM-RNN showed an MAE metric ranging from 0.4 \({}^{\circ}\)C to 1.2 \({}^{\circ}\)C, indicating that the acceptability criterion was met and the fall season yielded the best results. In Section 2, a series of studies focused on predicting greenhouse variables. Each investigation had specific objectives, not all centered around making predictions in advance; some studies make predictions to detect patterns and find the best adjustments. This comparison is shown in Table 11. \begin{table}
\begin{tabular}{c c c c c} \hline
**Season** & **R2** & **RMSE** & **MAE** & **MAPE** \\ \hline Fall & 0.9969 & 0.6957 & 0.4031 & 0.0161 \\ Winter & 0.9947 & 1.2580 & 1.0624 & 0.0483 \\ Spring & 0.9784 & 1.7533 & 1.2004 & 0.0415 \\ Summer & 0.9994 & 0.2698 & 0.1449 & 0.0041 \\ \hline \end{tabular}
\end{table} 
Table 10: Evaluation results for LSTM-RNN model. Figure 9: Analysis of metric results of the year’s seasons and proposed models. R2 (**a**), RMSE (**b**), MAE (**c**), and MAPE (**d**). The study by [PERSON] et al. uses the same database as the study being discussed. However, it takes a different approach to predicting the internal temperature of a greenhouse using regression methods such as the polynomial SVR algorithm. The results obtained show an R\({}^{2}\) of 0.9998 and an MAE of 0.0422. On the other hand, [PERSON] et al. used ANN to predict air temperature with an R\({}^{2}\) of 0.96 and MAPE of 0.49. Meanwhile, [PERSON] et al. combined RNN and BP to predict internal temperature, achieving a model with an R\({}^{2}\) of 0.95 and an MAE of 0.42. The studies mentioned use a forward prediction approach instead of relying on future or anticipated information in the modeling process. This approach involves predicting the future value of a variable of interest at the next time step based solely on historical data available up to the time of the prediction. The absence of advanced information in the prediction process ensures that the obtained results represent the model's ability to make accurate and reliable predictions in real time without prior knowledge of future events or data. Therefore, the high R\({}^{2}\) values and low errors, such as MAE and MAPE, in these studies indicate the effectiveness of the models in making accurate predictions without relying on advanced information. However, depending on the system type, these predictions may not be as valuable as preventive automatic control models for greenhouses. The work by [PERSON] et al. used the CNN-LSTM algorithm to predict wind energy, a starting point to analyze how the prediction behaves in variables other than internal temperature. They used different steps to make predictions ranging from 5 to 60 min, with an average MAE of 2.573 across all steps. The research conducted by [PERSON] et al. focuses on predicting internal humidity using LSTM-RNN. Their metrics showed an R\({}^{2}\) value greater than 0.8, making it the most consistent study with our research. However, it should be noted that their predictions were made using a different variable type, with a time frame of 30 min in advance. On the other hand, [PERSON] et al. used ANN to predict the air temperature inside a greenhouse. They obtained an R\({}^{2}\) of 0.98 and an MAE of 0.558 in their study, which was conducted with a 24-hour in advance prediction.