COMPARISON OF ACTIVATION AND OPTIMIZER PERFORMANCE IN LSTM MODEL FOR PURE BEEF PRICE PREDICTION

Authors

  • Dasril Aldo Telkom University

Keywords:

activation, beef price prediction, LSTM, optimization

Abstract

One of the primary factors impacting the economy is the ability to forecast the prices of commodities such as beef. This paper aims to evaluate the effectiveness of various activation functions and optimization strategies when integrated into the LSTM (Long Short-Term Memory) architecture model in predicting the price of lean beef in Aceh. The data sample utilized was obtained from the Indonesian National Food Agency panel, which shows daily prices for beef within the time frame of July 14th, 2022, to July 31st, 2024. As for the conducted research, the process of preparation data preprocessing, partitioning data into training, validation and test sets and the actual execution of the LSTM model which was trained using four different types of activation functions: tanh, ReLU, sigmoid and PReLU together with three different optimizers: Adam, Nadam and RMSprop for 50, 70, 100 and 200 training iterations. The evaluation metrics employed were Root Mean Squared Error (RMSE), Mean Absolute Percentage Error (MAPE), and the coefficient of determination (R-squared). The best performance was recorded at 200 epochs with the combination of PReLU activation function and Nadam optimizer, which had the best performance with RMSE = 2.56, MAPE = 0.65% and R² = 0.104. This combination was more effective than others since it depicted better overall performance in identifying complex non-linear relationships that existed in the price data. Further on, Nadam seems to have benefits in terms of allowing the model to converge faster and making the training more stable. This work stresses the selection of activation functions and optimization methods when building LSTM models aimed at forecasting prices of commodities with large volatility. It will be very helpful in developing better predictive models and decision-making processes in the agro-business. Another way to enhance predictive performance could be changing the model architecture or using different techniques, such as attention mechanisms.

Downloads

Download data is not yet available.

References

I. J. Liur, D. F. Souhoka, dan B. J. Papilaya, “ANALISIS KADAR AIR DAN KUALITAS FISIK DAGING SAPI YANG DIJUAL DI PASAR TRADISIONAL KOTA AMBON,” Agrinimal J. Ilmu Ternak Dan Tanam., vol. 10, no. 1, hlm. 45–50, Apr 2022, doi: 10.30598/ajitt.2022.10.1.45-50.

Sri Hardianti Rosadi dan Fitry Purnamasari, “Transmisi Harga Bawang Merah Ditingkat Produsen dan Konsumen di Sulawesi Selatan: Price Transmission of Onion at Producer and Consumer Level in South Sulawesi,” Perbal J. Pertan. Berkelanjutan, vol. 10, no. 2, hlm. 206–219, Jul 2022, doi: 10.30605/perbal.v10i2.1870.

M. Masduqi, E. M. Sari, dan Mohd. A. Nashri Abdullah, “Identifikasi Sifat Kuantitatif dan Sifat Kualitatif pada Sapi Aceh Dalam Rangka Pelestarian Sumber Daya Genetik Ternak Lokal,” J. Agripet, vol. 21, no. 2, hlm. 141–148, Okt 2021, doi: 10.17969/agripet.v21i2.21185.

N. Helmiah dan Nasrudin, “SIMULASI KEBIJAKAN PADA IMPLEMENTASI PERJANJIAN KOMPREHENSIF INDONESIA-AUSTRALIA (IA-CEPA) TERHADAP PASAR DAGING SAPI DOMESTIK,” Bul. Ilm. Litbang Perdagang., vol. 15, no. 2, hlm. 157–180, Des 2021, doi: 10.30908/bilp.v15i2.633.

A. I. Hasibuan, Sahara, dan S. Mulatsih, “Covid- 19 dan Disparitas Harga Daging Sapi Indonesia,” Policy Brief Pertan. Kelaut. Dan Biosains Trop., vol. 4, no. 1, hlm. 175–178, Feb 2022, doi: 10.29244/agro-maritim.0401.175-178.

K. Phoksawat, E. Phoksawat, dan B. Chanakot, “Forecasting smoked rubber sheets price based on a deep learning model with long short-term memory,” Int. J. Electr. Comput. Eng. IJECE, vol. 13, no. 1, hlm. 688, Feb 2023, doi: 10.11591/ijece.v13i1.pp688-696.

S. Sen, D. Sugiarto, dan A. Rochman, “Prediksi Harga Beras Menggunakan Metode Multilayer Perceptron (MLP) dan Long Short Term Memory (LSTM),” Ultim. J. Tek. Inform., vol. 12, no. 1, hlm. 35–41, Jul 2020, doi: 10.31937/ti.v12i1.1572.

R. M. S. Adi dan S. Sudianto, “Prediksi Harga Komoditas Pangan Menggunakan Algoritma Long Short-Term Memory (LSTM),” Build. Inform. Technol. Sci. BITS, vol. 4, no. 2, Sep 2022, doi: 10.47065/bits.v4i2.2229.

A. Isah dkk., “Digital Twins Temporal Dependencies-Based on Time Series Using Multivariate Long Short-Term Memory,” Electronics, vol. 12, no. 19, hlm. 4187, Okt 2023, doi: 10.3390/electronics12194187.

X. Wen dan W. Li, “Time Series Prediction Based on LSTM-Attention-LSTM Model,” IEEE Access, vol. 11, hlm. 48322–48331, 2023, doi: 10.1109/ACCESS.2023.3276628.

M. A. Mohamed, H. A. Hassan, M. H. Essai, H. Esmaiel, A. S. Mubarak, dan O. A. Omer, “Modified gate activation functions of Bi-LSTM-based SC-FDMA channel equalization,” J. Electr. Eng., vol. 74, no. 4, hlm. 256–266, Agu 2023, doi: 10.2478/jee-2023-0032.

V. Sakellariou, V. Paliouras, I. Kouretas, H. Saleh, dan T. Stouraitis, “A High-performance RNS LSTM block,” dalam 2022 IEEE International Symposium on Circuits and Systems (ISCAS), Austin, TX, USA: IEEE, Mei 2022, hlm. 1264–1268. doi: 10.1109/ISCAS48785.2022.9937633.

B. Budiman, N. Alamsyah, dan R. Y. R. Alamsyah, “ACTIVATION FUNCTION IN LSTM FOR IMPROVED FORECASTING OF CLOSING NATURAL GAS STOCK PRICES,” JITK J. Ilmu Pengetah. Dan Teknol. Komput., vol. 10, no. 1, hlm. 100–107, Agu 2024, doi: 10.33480/jitk.v10i1.5258.

Y. Loday, P. Apirukvorapinit, dan 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,” dalam 2023 8th International Conference on Business and Industrial Research (ICBIR), Bangkok, Thailand: IEEE, Mei 2023, hlm. 645–650. doi: 10.1109/ICBIR57571.2023.10147486.

A. Wahab, A. Herdian, D. Wirawan, Y. Jumaryadi, S. Alam, dan A. Fiade, “Stock Prediction for Indonesia Stock Exchange with Long Short-Term Memory,” J. Ilm. FIFO, vol. 16, no. 1, hlm. 96, Jun 2024, doi: 10.22441/fifo.2024.v16i1.010.

W. Zhai, “Stock Price Prediction Based on Optimized LSTM Model,” dalam Proceedings of the 2nd International Conference on Financial Innovation, FinTech and Information Technology, FFIT 2023, July 7–9, 2023, Chongqing, China, Chongqing, People’s Republic of China: EAI, 2023. doi: 10.4108/eai.7-7-2023.2338038.

H. M. Sami, K. A. Ahsan, dan P. N. Rozario, “Determining the Best Activation Functions for Predicting Stock Prices in Different (Stock Exchanges) Through Multivariable Time Series Forecasting of LSTM,” Aust. J. Eng. Innov. Technol., hlm. 63–71, Apr 2023, doi: 10.34104/ajeit.023.063071.

Y. L. Sukestiyarno, D. T. Wiyanti, L. Azizah, dan W. Widada, “Algorithm Optimizer in GA-LSTM for Stock Price Forecasting,” Contemp. Math., Jan 2024, doi: 10.37256/cm.5120243367.

P. Paygude dkk., “Optimizing Hyperparameters for Enhanced LSTM-Based Prediction System Performance,” Int. J. Recent Innov. Trends Comput. Commun., vol. 11, no. 10s, hlm. 203–213, Okt 2023, doi: 10.17762/ijritcc.v11i10s.7620.

M. Diqi dan H. Hamzah, “Improving Stock Price Prediction Accuracy with StacBi LSTM,” JISKA J. Inform. Sunan Kalijaga, vol. 9, no. 1, hlm. 10–26, Jan 2024, doi: 10.14421/jiska.2024.9.1.10-26.

J. J. Pangaribuan, F. Fanny, O. P. Barus, dan R. Romindo, “Prediksi Penjualan Bisnis Rumah Properti Dengan Menggunakan Metode Autoregressive Integrated Moving Average (ARIMA),” J. Sist. Inf. Bisnis, vol. 13, no. 2, hlm. 154–161, Okt 2023, doi: 10.21456/vol13iss2pp154-161.

M. Ibrahim, H. R. Perwira Negara, dan S. Syaharuddin, “Prediction of Land Area Harvest, Production, Rice Productivity: A Accuracy Analysis of ARIMA Methods,” Protech Biosyst. J., vol. 1, no. 1, hlm. 1, Jun 2021, doi: 10.31764/protech.v1i1.4776.

M. M. H. Khan, M. R. U. Mustafa, M. S. Hossain, S. Shams, dan A. D. Julius, “Short-Term and Long-Term Rainfall Forecasting Using ARIMA Model,” Int. J. Environ. Sci. Dev., vol. 14, no. 5, hlm. 292–298, 2023, doi: 10.18178/ijesd.2023.14.5.1447.

Z. Wang dan Y. Li, “Price movement prediction using deep learning: a case study of the China futures market,” dalam Third International Conference on Computer Science and Communication Technology (ICCSCT 2022), Y. Lu dan C. Cheng, Ed., Beijing, China: SPIE, Des 2022, hlm. 223. doi: 10.1117/12.2662524.

X. Zhang, C. Li, K.-L. Chen, D. Chrysostomou, dan H. Yang, “Stock Prediction with Stacked-LSTM Neural Networks,” dalam 2021 IEEE 21st International Conference on Software Quality, Reliability and Security Companion (QRS-C), Hainan, China: IEEE, Des 2021, hlm. 1119–1125. doi: 10.1109/QRS-C55045.2021.00166.

F. Kayim dan A. Yilmaz, “Time Series Forecasting With Volatility Activation Function,” IEEE Access, vol. 10, hlm. 104000–104010, 2022, doi: 10.1109/ACCESS.2022.3211312.

J. Wang dan 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, hlm. 7653091, Jan 2021, doi: 10.1155/2021/7653091.

G. Huang, “Missing data filling method based on linear interpolation and lightgbm,” J. Phys. Conf. Ser., vol. 1754, no. 1, hlm. 012187, Feb 2021, doi: 10.1088/1742-6596/1754/1/012187.

M. Pagan, M. Zarlis, dan A. Candra, “Investigating the impact of data scaling on the k-nearest neighbor algorithm,” Comput. Sci. Inf. Technol., vol. 4, no. 2, hlm. 135–142, Jul 2023, doi: 10.11591/csit.v4i2.p135-142.

H. Ghasemzadeh, R. E. Hillman, dan D. D. Mehta, “Toward Generalizable Machine Learning Models in Speech, Language, and Hearing Sciences: Estimating Sample Size and Reducing Overfitting,” J. Speech Lang. Hear. Res., vol. 67, no. 3, hlm. 753–781, Mar 2024, doi: 10.1044/2023_JSLHR-23-00273.

S. Feng dan Y. Feng, “A Dual-Staged Attention Based Conversion-Gated Long Short Term Memory for Multivariable Time Series Prediction,” IEEE Access, vol. 10, hlm. 368–379, 2022, doi: 10.1109/ACCESS.2021.3136712.

Z. Pan, Z. Gu, X. Jiang, G. Zhu, dan D. Ma, “A Modular Approximation Methodology for Efficient Fixed-Point Hardware Implementation of the Sigmoid Function,” IEEE Trans. Ind. Electron., vol. 69, no. 10, hlm. 10694–10703, Okt 2022, doi: 10.1109/TIE.2022.3146573.

Y. Bai, “RELU-Function and Derived Function Review,” SHS Web Conf., vol. 144, hlm. 02006, 2022, doi: 10.1051/shsconf/202214402006.

S. Sorayaasa dan M. Ahmadi, “Efficient Implementation of Tanh: A Comparative Study of New Results,” dalam Artificial Intelligence Advances, Academy and Industry Research Collaboration Center (AIRCC), Apr 2023, hlm. 01–07. doi: 10.5121/csit.2023.130701.

R. A. Hasan dan J. E. Jamaluddin, “Prediction of Covid-19 Cases for Malaysia, Egypt, and USA using Deep Learning Models,” Malays. J. Fundam. Appl. Sci., vol. 19, no. 3, hlm. 417–428, Mei 2023, doi: 10.11113/mjfas.v19n3.2992.

T. O. Hodson, “Root-mean-square error (RMSE) or mean absolute error (MAE): when to use them or not,” Geosci. Model Dev., vol. 15, no. 14, hlm. 5481–5487, Jul 2022, doi: 10.5194/gmd-15-5481-2022.

M. Bossé, E. Marland, G. Rhoads, J. A. Sanqui, dan Z. BeMent, “Generalizing R 2 for deming regressions,” Commun. Stat. - Theory Methods, vol. 52, no. 21, hlm. 7731–7743, Nov 2023, doi: 10.1080/03610926.2022.2059678.

Downloads

Published

2025-02-03

How to Cite

[1]
D. Aldo, “COMPARISON OF ACTIVATION AND OPTIMIZER PERFORMANCE IN LSTM MODEL FOR PURE BEEF PRICE PREDICTION”, jitk, vol. 10, no. 3, pp. 573–585, Feb. 2025.