Rice production is a strategic commodity that plays a vital role in maintaining food security in Indonesia. Rice production data, being time-series in nature, is influenced by trends, seasonal patterns, and weather and climate factors; therefore, a prediction model capable of accurately capturing temporal patterns is required. This study aims to compare the performance of Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU) models in predicting rice production on the island of Sumatra. The study utilizes secondary data obtained from Statistics Indonesia (BPS), the Meteorology, Climatology, and Geophysics Agency (BMKG), and Kaggle. Preprocessing stages include handling missing data, data normalization, and transformation into a time-series format. The data is then split into training and testing sets using an 80:20 ratio. Model performance is evaluated using Mean Absolute Error (MAE), Mean Squared Error (MSE), and Root Mean Squared Error (RMSE). The results indicate that the GRU model outperforms the LSTM model, yielding an MAE of 0.0505, MSE of 0.0075, and RMSE of 0.0868, whereas the LSTM model produces an MAE of 0.0522, MSE of 0.0082, and RMSE of 0.0917. Thus, the GRU model is more effective at capturing the temporal patterns of rice production data and generating more accurate predictions compared to the LSTM model. These findings are expected to serve as a reference for selecting rice production prediction models to support data-driven decision-making in the agricultural sector.
Copyrights © 2026