Shallots are one of the essential food commodities in East Java, the price of which frequently fluctuates due to seasonal influences and distribution factors. This price uncertainty often weakens the community's purchasing power and makes it difficult for farmers and sellers to make decisions. Therefore, this study proposes a daily shallot price prediction model for nine regions in East Java using the Long Short-Term Memory (LSTM) method with hyperparameter tuning to obtain the best-performing model. This study utilizes daily price data from PIHPS (Pusat Informasi Harga Pangan Strategis / Strategic Food Price Information Center) over four years, from January 1, 2021, to December 31, 2024. The research stages begin with data preprocessing, which includes imputing missing values to ensure continuity of the time sequence, data normalization, and arrangement of data based on temporal order (time series). To obtain the optimal model, the data was split into 80% for training and 20% for testing. Based on the experimental results, the optimal model configuration was found using a Window Size of 7 (the last seven days of data), 114 Epochs, and a Batch Size of 64. Furthermore, the reliability of the model was measured using MAPE, where the average across all regions fell below 10%, which is classified as "Very Good" based on MAPE interpretation standards. Additional testing using 2025 data as an independent dataset further confirmed that the model remains consistent and stable, as evidenced by an average MAPE of 3.10% across the nine regions.
Copyrights © 2026