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.
Copyrights © 2025