Arabica Coffee Price Prediction Using the Long Short Term Memory Network (LSTM) Algorithm

Lila Setiyani(1), Wiranto Herry Utomo(2),


(1) Department of Informatics, President University, Indonesia
(2) Department of Informatics, President University, Indonesia

Abstract

Purpose:  Arabica coffee beans have been widely cultivated in various parts of the world. The need for coffee beans is estimated to increase every year. This was followed by the rapid growth of franchised coffee shops and cafes, therefore Arabica coffee beans have been traded legally in the world, thus making the price of these Arabica coffee beans a public
concern. This prediction of the price of Arabica coffee beans can be input for business actors in the coffee shop, café franchises, and farmers in the decision-making process. This study aims to predict the price of Arabica coffee beans in 2023 and 2024 using the long short-term memory (LSTM) Algorithm.
Methods:  The research procedure is carried out by collecting data, data analysis, and preprocessing, and building a forecasting model using the Long Short-Term Memory Network (LSTM) algorithm. Arabica coffee bean price datasets in this study were taken from The Pink Sheet World Bank Commodity Price Data, which presents Arabica coffee bean prices from 1960 to February 2023.
Results:  The results of this study indicate the predicted price of Arabica coffee beans in 2023 and 2024 with Error (MAE), which is the average absolute difference between the actual value and the predicted value.
Novelty:  What is most important and what differentiates it from previous research is in the preprocessing using two algorithms namely MinMaxScaler and Sliding Window. Meanwhile, for the training model, GridSearchCV is used. The model is evaluated using the lost function using Mean Squared Error (MSE) and Mean Absolute Error (MAE) thereby making it easy to evaluate the performance of the model.

 

Keywords

Arabica coffee beans; Prediction; LSTM; Long short-term memory network

Full Text:

PDF

References

E. Landsteiner and E. Langthaler, “Global Commodities: Special Issue of the,” Commod. Front., 2021.

H. A. Kebede, “The Pass-Through of International Commodity Price Shocks to Producers’ Welfare: Evidence from Ethiopian Coffee Farmers,” World Bank Econ. Rev., vol. 36, no. 2, pp. 305–328, 2022, doi: 10.1093/wber/lhab020.

J. Pancsira, “International Coffee Trade: a literature review,” J. Agric. Informatics, vol. 13, no. 1, pp. 26–35, 2022, doi: 10.17700/jai.2022.13.1.654.

World Bank Commodity Price Data (The Pink Sheet), “World Bank Commodity Price Data (The Pink Sheet).”

F. Fitriani, B. Arifin, and H. Ismono, “Indonesian coffee exports and its relation to global market integration,” J. Socioecon. Dev., vol. 4, no. 1, p. 120, 2021, doi: 10.31328/jsed.v4i1.2115.

H. Ke, Z. Zuominyang, L. Qiumei, and L. Yin, “Predicting Chinese Commodity Futures Price: An EEMD-Hurst-LSTM Hybrid Approach,” IEEE Access, vol. 11, no. January, pp. 1–1, 2023, doi: 10.1109/access.2023.3239924.

X. Xu and Y. Zhang, “Soybean and Soybean Oil Price Forecasting through the Nonlinear Autoregressive Neural Network (NARNN) and NARNN with Exogenous Inputs (NARNN–X),” Intell. Syst. with Appl., vol. 13, p. 200061, 2022, doi: 10.1016/j.iswa.2022.200061.

X. Xu and Y. Zhang, “Thermal coal price forecasting via the neural network,” Intell. Syst. with Appl., vol. 14, 2022, doi: 10.1016/j.iswa.2022.200084.

Y. Liu, C. Yang, K. Huang, and W. Liu, “A Multi-Factor Selection and Fusion Method through the CNN-LSTM Network for Dynamic Price Forecasting,” Mathematics, 2023.

A. Bode, “K-NEAREST NEIGHBOR WITH FEATURE SELECTION USING BACKWARD ELIMINATION FOR PRICE PREDICTION OF ARABICA COFFEE COMMODITIES,” Ilk. J. Ilm., vol. 9, no. 2, pp. 188–195, 2017, doi: 10.33096/ilkom.v9i2.139.188-195.

M. E. Lasulika, “Corn Commodity Price Prediction Using K-Nn And Particle Swarm Optimization As Selection Features,” Ilk. J. Ilm., vol. 9, no. 3, pp. 233–238, 2017, doi: 10.33096/ilkom.v9i3.148.233-238.

M. Nanja and P. Purwanto, “Forward Selection Based K-Nearest Neighbor Method For Pepper Commodity Price Prediction,” Pseudocode, vol. 2, no. 1, pp. 53–64, 2015, doi: 10.33369/pseudocode.2.1.53-64.

Z. Chen, H. S. Goh, K. L. Sin, K. Lim, N. K. H. Chung, and X. Y. Liew, “Automated Agriculture Commodity Price Prediction System with Machine Learning Techniques,” Adv. Sci. Technol. Eng. Syst. J., vol. 6, no. 4, pp. 376–384, 2021, doi: 10.25046/aj060442.

Y. H. Gu, D. Jin, H. Yin, R. Zheng, X. Piao, and S. J. Yoo, “Forecasting Agricultural Commodity Prices Using Dual Input Attention LSTM,” Agric., vol. 12, no. 2, 2022, doi: 10.3390/agriculture12020256.

S. Hasmita, F. Nhita, D. Saepudin, and A. Aditsania, “Chili commodity price forecasting in bandung regency using the adaptive synthetic sampling (ADASYN) and K-Nearest neighbor (KNN) algorithms,” 2019 Int. Conf. Inf. Commun. Technol. ICOIACT 2019, pp. 434–438, 2019, doi: 10.1109/ICOIACT46704.2019.8938525.

J. Wang and X. Li, “A combined neural network model for commodity price forecasting with SSA,” Soft Comput., vol. 22, no. 16, pp. 5323–5333, 2018, doi: 10.1007/s00500-018-3023-2.

W. Anggraeni et al., “Agricultural strategic commodity price forecasting using artificial neural network,” 2018 Int. Semin. Res. Inf. Technol. Intell. Syst. ISRITI 2018, pp. 347–352, 2018, doi: 10.1109/ISRITI.2018.8864442.

S. C. Huang and C. F. Wu, “Energy commodity price forecasting with deep multiple kernel learning,” Energies, vol. 11, no. 11, pp. 1–16, 2018, doi: 10.3390/en11113029.

B. Komer, J. Bergstra, and C. Eliasmith, “Hyperopt-Sklearn: Automatic Hyperparameter Configuration for Scikit-Learn,” Proc. 13th Python Sci. Conf., no. Scipy, pp. 32–37, 2014, doi: 10.25080/majora-14bd3278-006.

V. Suresh, P. Janik, J. Rezmer, and Z. Leonowicz, “Forecasting solar PV output using convolutional neural networks with a sliding window algorithm,” Energies, vol. 13, no. 3, 2020, doi: 10.3390/en13030723.

Z. M. Alhakeem, Y. M. Jebur, S. N. Henedy, H. Imran, L. F. A. Bernardo, and H. M. Hussein, “Prediction of Ecofriendly Concrete Compressive Strength Using Gradient Boosting Regression Tree Combined with GridSearchCV Hyperparameter-Optimization Techniques,” Materials (Basel)., vol. 15, no. 21, 2022, doi: 10.3390/ma15217432.

T. O. Hodson, T. M. Over, and S. S. Foks, “Mean Squared Error, Deconstructed,” J. Adv. Model. Earth Syst., vol. 13, no. 12, pp. 1–10, 2021, doi: 10.1029/2021MS002681.

J. Qi, J. Du, S. M. Siniscalchi, X. Ma, and C. H. Lee, “On Mean Absolute Error for Deep Neural Network Based Vector-to-Vector Regression,” IEEE Signal Process. Lett., vol. 27, pp. 1485–1489, 2020, doi: 10.1109/LSP.2020.3016837.

Codecademy Team, “Long Short Term Memory Networks.”

StackExchange, “What is the difference between LSTM and RNN?”

K. Qiu, J. Li, and D. Chen, “Optimized long short-term memory (LSTM) network for performance prediction in unconventional reservoirs,” Energy Reports, vol. 8, pp. 15436–15445, 2022, doi: 10.1016/j.egyr.2022.11.130.

F. T. Admojo and Y. I. Sulistya, “Stochastic Gradient Descent (SGD) Algorithm Performance Analysis in Classifying Formalin Tofu,” Indones. J. Data Sci., vol. 3, no. 1, pp. 1–8, 2022, doi: 10.56705/ijodas.v3i1.42.

P. Arsi, T. Astuti, D. Rahmawati, and P. Subarkah, “Implementation of Sliding Window Algorithm on Neural Network-based Exchange Rate Prediction,” vol. 6, no. 1, pp. 51–59, 2022.

A. S. B. Karno, “Prediction of Bank BRI Stock Time Series Data Using LSTM (Long Short Term Memory) Learning Machines,” J. Inform. Inf. Secur., vol. 1, no. 1, pp. 1–8, 2020, doi: 10.31599/jiforty.v1i1.133.

Refbacks

  • There are currently no refbacks.




Scientific Journal of Informatics (SJI)
p-ISSN 2407-7658 | e-ISSN 2460-0040
Published By Department of Computer Science Universitas Negeri Semarang
Website: https://journal.unnes.ac.id/nju/index.php/sji
Email: [email protected]

Creative Commons License

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