Optimization of LSTM Hyperparameters Using PSO for Forecasting Shallots and Garlic

This research develops a shallot and garlic price prediction model using a Long Short-Term Memory (LSTM) network optimized through the Particle Swarm Optimization (PSO) method. Indonesia experiences an annual increase in demand for these two commodities. This research focuses on optimizing LSTM parameters, such as the number of units in each layer, learning rate, batch size, time step, and number of training epochs using PSO. Various trials were conducted with different PSO parameter settings and data partitioning scenarios to find the best configuration in predicting prices. The results show that the LSTM model optimized with PSO produces an RMSE value of 436,969 for shallots and 173,866 for garlic. In addition to RMSE, the Mean Absolute Percentage Error (MAPE) and R² metrics also show high prediction accuracy. The 90:10 data partitioning scenario showed the best evaluation results, indicating that more data improves the accuracy of the LSTM in learning price patterns. Scatter plots comparing predicted prices with actual prices show a good match, although there is some variation in certain price ranges. This study also highlights the effect of data partitioning on model performance. The LSTM-PSO approach proved effective in improving the accuracy of price predictions and has practical implications for farmers and policy makers in decision making. The model has the potential to be a decision support tool in the agribusiness sector, with the possibility of further development with external factors.

Authors

Institutions

Publication Details

Journal
bit-Tech
Published
2025-08-10
DOI
https://doi.org/10.32877/bt.v8i1.2569
Primary Topic
Garlic and Onion Studies
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Optimization of LSTM Hyperparameters Using PSO for Forecasting Shallots and Garlic

Anggraini Puspita Sari, Achmad Junaidi, Mutiq Anisa Tanjung
bit-Tech
Garlic and Onion Studies
article

Optimization of LSTM Hyperparameters Using PSO for Forecasting Shallots and Garlic

Anggraini Puspita Sari, Achmad Junaidi, Mutiq Anisa Tanjung
article en

Abstract

This research develops a shallot and garlic price prediction model using a Long Short-Term Memory (LSTM) network optimized through the Particle Swarm Optimization (PSO) method. Indonesia experiences an annual increase in demand for these two commodities. This research focuses on optimizing LSTM parameters, such as the number of units in each layer, learning rate, batch size, time step, and number of training epochs using PSO. Various trials were conducted with different PSO parameter settings and data partitioning scenarios to find the best configuration in predicting prices. The results show that the LSTM model optimized with PSO produces an RMSE value of 436,969 for shallots and 173,866 for garlic. In addition to RMSE, the Mean Absolute Percentage Error (MAPE) and R² metrics also show high prediction accuracy. The 90:10 data partitioning scenario showed the best evaluation results, indicating that more data improves the accuracy of the LSTM in learning price patterns. Scatter plots comparing predicted prices with actual prices show a good match, although there is some variation in certain price ranges. This study also highlights the effect of data partitioning on model performance. The LSTM-PSO approach proved effective in improving the accuracy of price predictions and has practical implications for farmers and policy makers in decision making. The model has the potential to be a decision support tool in the agribusiness sector, with the possibility of further development with external factors.

bit-TechVol. 8(1)
University of Pembangunan Nasional Veteran Jawa Timur (ID)
Openalex Percentile: Top 85%
Garlic and Onion Studies
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.