Performance Comparison of LSTM Models with Various Optimizers and Activation Functions for Garlic Bulb Price Prediction Using Deep Learning
DOI:
https://doi.org/10.52436/1.jutif.2025.6.2.4412Keywords:
Activation Function, Commodity Price Prediction, LSTM, Optimization Algorithm, Time Series AnalysisAbstract
Accurate commodity price forecasting is crucial for market stability and decision-making. This study evaluates the performance of the Long Short-Term Memory (LSTM) model using various activation functions and optimization algorithms for predicting garlic bulb prices. Historical price data was collected from panelharga.badanpangan.go.id and preprocessed through normalization and dataset splitting into training, validation, and test sets. The model was trained for 200 epochs using activation functions ReLU, Sigmoid, and Tanh, combined with optimization algorithms Adam, RMSprop, SGD, Adagrad, Adadelta, Nadam, and AdamW. Experimental results indicate that ReLU + Adam achieves the best performance with Final Epoch Loss of 0.001789, RMSE of 0.701632, MAPE of 0.009593, and R² of 0.909794, followed by Sigmoid + Nadam and Tanh + Adam, which also yielded high accuracy. These findings reinforce prior research, highlighting Adam and its momentum-based variants as effective optimizers for LSTM training. This study provides insights into selecting optimal activation functions and optimizers for commodity price forecasting. Future work may explore hybrid models and external factors, such as global market trends, to enhance predictive accuracy in time series data analysis.
Downloads
References
Y. Setiawan, T. Tarno, and P. Kartikasari, ‘PREDIKSI HARGA JUAL KAKAO DENGAN METODE LONG SHORT-TERM MEMORY MENGGUNAKAN METODE OPTIMASI ROOT MEAN SQUARE PROPAGATION DAN ADAPTIVE MOMENT ESTIMATION DILENGKAPI GUI RSHINY’, J. Gaussian, vol. 11, no. 1, pp. 99–107, May 2022, doi:
14710/j.gauss.v11i1.33994.
J. Wang and J. Wang, ‘A New Hybrid Forecasting Model Based on SW‐LSTM and Wavelet Packet Decomposition: A Case Study of Oil Futures Prices’, Comput. Intell. Neurosci., vol. 2021, no. 1, p. 7653091, Jan. 2021, doi: 10.1155/2021/7653091.
X. W. GAO and A. GAO, ‘COVID-CBR: A Deep Learning Architecture Featuring Case-Based Reasoning for Classification of COVID-19 from Chest X-Ray Images’, 2021 20th IEEE Int. Conf. Mach. Learn. Appl. ICMLA, pp. 1319–1324, 2022, doi: 10.1109/ICMLA52953.2021.00214.
E. J. Griffis, O. S. Patil, Z. I. Bell, and W. E. Dixon, ‘Lyapunov-Based Long Short-Term Memory (Lb-LSTM) Neural Network-Based Control’, IEEE Control Syst. Lett., vol. 7, pp. 2976–2981, 2023, doi: 10.1109/LCSYS.2023.3291328.
N. Pai, I. Velchamy, and N. B. Ramesh, ‘Forecasting of Multistep Multivariate Financial Data Through GSO Algorithm Infused Vanilla LSTM Model’, J. Comput. Sci., vol. 19, no. 7, pp. 909– 924, Jul. 2023, doi: 10.3844/jcssp.2023.909.924.
I. sibel Kervanci and F. Akay, ‘LSTM Hyperparameters optimization with Hparam parameters for Bitcoin Price Prediction’, Sak. Univ. J. Comput. Inf. Sci., vol. 6, no. 1, pp. 1–9, Apr. 2023, doi: 10.35377/saucis...1172027.
Y. Loday, P. Apirukvorapinit, and P. Vejjanugraha, ‘Stock Price Prediction Using Modified Bidirectional Long Short-Term Memory and Deep Learning Models: A Case Study of Bhutan Tourism Corporation Limited Stock Data’, in 2023 8th International Conference on Business and Industrial Research (ICBIR), Bangkok, Thailand: IEEE, May 2023, pp. 645–650. doi: 10.1109/ICBIR57571.2023.10147486.
N. Chen, ‘Exploring the development and application of LSTM variants’, Appl. Comput. Eng., vol. 53, no. 1, pp. 103–107, Mar. 2024, doi: 10.54254/2755-2721/53/20241288.
P. R. Low and E. Sakk, ‘Comparison between autoregressive integrated moving average and long short term memory models for stock price prediction’, IAES Int. J. Artif. Intell. IJ-AI, vol. 12, no. 4, p. 1828, Dec. 2023, doi: 10.11591/ijai.v12.i4.pp1828-1835.
Q. Liang, Y.-C. Chan, P. B. Changala, D. J. Nesbitt, J. Ye, and J. Toscano, ‘Ultrasensitive multispecies spectroscopic breath analysis for real-time health monitoring and diagnostics’, Proc. Natl. Acad. Sci., vol. 118, no. 40, p. e2105063118, Oct. 2021, doi: 10.1073/pnas.2105063118.
S.-F. Yang, S.-W. Choi, and E.-B. Lee, ‘A Prediction Model for Spot LNG Prices Based on Machine Learning Algorithms to Reduce Fluctuation Risks in Purchasing Prices’, Energies, vol. 16, no. 11, p. 4271, May 2023, doi: 10.3390/en16114271.
Y. Lu, Y. Teng, Q. Zhang, and J. Dai, ‘Prediction Model for the Chemical Futures Price Using Improved Genetic Algorithm Based Long Short-Term Memory’, Processes, vol. 11, no. 1, p. 238, Jan. 2023, doi: 10.3390/pr11010238.
G. Huang, ‘Missing data filling method based on linear interpolation and lightgbm’, J. Phys. Conf. Ser., vol. 1754, no. 1, p. 012187, Feb. 2021, doi: 10.1088/1742-6596/1754/1/012187.
X. Zhang, C. Li, K.-L. Chen, D. Chrysostomou, and H. Yang, ‘Stock Prediction with Stacked- LSTM Neural Networks’, in 2021 IEEE 21st International Conference on Software Quality, Reliability and Security Companion (QRS-C), Hainan, China: IEEE, Dec. 2021, pp. 1119–1125. doi: 10.1109/QRS-C55045.2021.00166.
O. S. Alshehri, O. M. Alshehri, and H. Samma, ‘Blood Glucose Prediction Using RNN, LSTM, and GRU: A Comparative Study’, in 2024 IEEE International Conference on Advanced Systems and Emergent Technologies (IC_ASET), Hammamet, Tunisia: IEEE, Apr. 2024, pp. 1–5. doi: 10.1109/IC_ASET61847.2024.10596176.
T. J. Mbah, H. Ye, J. Zhang, and M. Long, ‘Using LSTM and ARIMA to Simulate and Predict Limestone Price Variations’, Min. Metall. Explor., vol. 38, no. 2, pp. 913–926, Apr. 2021, doi: 10.1007/s42461-020-00362-y.
Y. Chen, ‘Price Prediction of Cude oil, Gold, and Cotton Based on OLS, Random Forest, and Lightgbm’, BCP Bus. Manag., vol. 38, pp. 3361–3369, Mar. 2023, doi: 10.54691/bcpbm.v38i.4300.
F. Tang, H. Yi, H. Cui, and K. Zhang, ‘A Stock Prediction Method Based on Singular Spectrum Analysis and Long Short-Term Memory Network’, in 2023 IEEE 6th International Conference on Electronic Information and Communication Technology (ICEICT), Qingdao, China: IEEE, Jul. 2023, pp. 967–970. doi: 10.1109/ICEICT57916.2023.10245558.
J. Lv, C. Wang, W. Gao, and Q. Zhao, ‘An Economic Forecasting Method Based on the LightGBM‐Optimized LSTM and Time‐Series Model’, Comput. Intell. Neurosci., vol. 2021, no. 1, p. 8128879, Jan. 2021, doi: 10.1155/2021/8128879.
V. G. Kowti, ‘Stock Price Prediction using LSTM and KNN Algorithms’, Int. J. Res. Appl. Sci. Eng. Technol., vol. 11, no. 9, pp. 1591–1595, Sep. 2023, doi: 10.22214/ijraset.2023.55894.
S. Sinsomboonthong, ‘Performance Comparison of New Adjusted Min-Max with Decimal Scaling and Statistical Column Normalization Methods for Artificial Neural Network Classification’, Int. J. Math. Math. Sci., vol. 2022, pp. 1–9, Apr. 2022, doi: 10.1155/2022/3584406.
M. H. Essai Ali, A. B. Abdel-Raman, and E. A. Badry, ‘Developing Novel Activation Functions Based Deep Learning LSTM for Classification’, IEEE Access, vol. 10, pp. 97259–97275, 2022, doi: 10.1109/ACCESS.2022.3205774.
M. Taqiyuddin, K. Adi, O. Dwi Nurhayati, and H. Ochi, ‘Comparison of Optimizers for Drone Signal Detection Using Convolutional Neural Networks (CNN)’, E3S Web Conf., vol. 448, p. 02025, 2023, doi: 10.1051/e3sconf/202344802025.
D. Chicco, M. J. Warrens, and G. Jurman, ‘The coefficient of determination R-squared is more informative than SMAPE, MAE, MAPE, MSE and RMSE in regression analysis evaluation’, PeerJ Comput. Sci., vol. 7, p. e623, Jul. 2021, doi: 10.7717/peerj-cs.623.
H. Xu, J. Liang, and W. Zang, ‘Prediction of Agricultural Commodities Futures Prices: A DQN- LSTM Method’, Nov. 30, 2021. doi: 10.21203/rs.3.rs-1097759/v1.
Additional Files
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Dasril Aldo, Adanti Wido Paramadini, Muhammad Afrizal Amrustian

This work is licensed under a Creative Commons Attribution 4.0 International License.