Soil temperature prediction is an important aspect of greenhouse microclimate management as it affects plant growth and resource efficiency. This study aims to compare the performance of Random Forest (RF) and Long Short-Term Memory (LSTM) algorithms in predicting soil temperature one hour ahead in a greenhouse environment. The dataset was collected from observations conducted from March 23 to June 3, 2026, with a recording interval of 1 minute, including air temperature, air humidity, soil temperature, soil moisture, and light intensity parameters. The data prepossessing stages included data cleaning, missing value interpolation, outlier detection using the Interquartile Range (IQR) method, target variable construction using time shifting, and feature engineering. This study employed four model scenarios: RF with soil moisture, RF without soil moisture, LSTM with soil moisture, and LSTM without soil moisture. Model performance was evaluated using Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and Coefficient of Determination (R²). The results showed that all models achieved good performance with R² values above 0.95. The best performance was achieved by the LSTM model without soil moisture, with MAE of 0.3287, RMSE of 0.5881, and R² of 0.9662. These findings indicate that the LSTM model is more effective in capturing the temporal patterns of soil temperature compared to Random Forest. In addition, the soil moisture parameter was found to have a low contribution to prediction accuracy.
Copyrights © 2026