## 1 Introduction
Although different techniques have been developed to model temperature behavior inside greenhouses, they often only use variable monitoring instead of forecasting, limiting the implementation of automatic control to corrective and non-preventative actions, which may only partially satisfy the needs of greenhouse growers. However, AI-based algorithms have been developed to act preventively by adjusting heating/cooling systems, ventilation, and carbonic fertilization supply through actuators installed to ensure optimal growth, maintenance, and pest control of crops in greenhouses [20]. Integrating a preventive model into the automatic control system of greenhouses is vital to ensuring optimal crop growth. Extreme temperatures can negatively affect crop morphology and physiological processes, resulting in floral formation, leaf burn, poor fruit quality, excess transpiration, and a shortened crop lifespan. By effectively controlling the microclimate within the greenhouse, the risk of developing pathogens and damaging crops can be minimized [21]. Previous research by [PERSON] et al. [22] focused on creating an accurate temperature prediction model for a greenhouse using linear and support vector regression techniques. However, this paper proposes using the same greenhouse data set to predict the internal temperature up to one hour in advance by applying supervised learning algorithms such as LSTM-RNN and XGBoost. These algorithms are used because LSTM excels at processing sequential data. They can remember long-term patterns and learn temporal dependencies through specialized memory units [23]. On the other hand, XGBoost combines multiple weak models to form a more robust model, allowing the model to learn complex relationships between features and obtain more accurate results [24]. Both techniques provide effective time series forecasting; therefore, they are suitable for enabling preventive control of the greenhouse. The contributions of this paper can be summarized as follows: In order to prevent issues like crop diseases and poor fruit quality caused by uncontrolled microclimate changes inside greenhouses, meteorological data can be analyzed using supervised learning techniques in a controlled environment. By utilizing predictive models and intelligent control systems in agriculture, crop efficiency, and productivity can be significantly enhanced while minimizing the risks associated with sudden changes in greenhouse conditions. The comparison between different ML models lets the researchers/producers analyze which one fits their needs better, for example, adding more computational power if higher prediction accuracy is needed or less computational power with less prediction accuracy, taking into consideration that this LTSM-RNN will need a lot of more power to achieve the level of accuracy that this paper shows later in the results section. A study on data segmentation based on the annual climate seasons shows that an algorithm per season would benefit temperature prediction due to the particularities of each one, and prediction errors tend to increase when projecting towards extended periods. Also, this technology has the potential to benefit the agricultural industry by improving crop quality and yield while also reducing the consumption of resources, such as energy. The paper is organized as follows: Section 2 shows the existing works related to SF in greenhouses. Section 3 details the proposed workflow using the Team Data Science Process (TDSP) methodology and explains how forecasting in the greenhouse is implemented. The results are presented in Section 4, while Section 5 provides a discussion. The paper closes with Section 6, which summarizes the findings and presents the conclusions.