Forecasting Agricultural Commodity Prices Using Dual Input Attention LSTM
Abstract
:1. Introduction
2. Materials and Methods
2.1. Dataset Description
2.1.1. Wholesale Price of Agricultural Products
2.1.2. Trading Volume of Agricultural Products
2.1.3. Meteorological Data
2.2. Proposed Dual Input Attention LSTM (DIA-LSTM)
2.3. Training Procedure
3. Results
3.1. Evaluation Metrics
3.2. Optimal Time-Step Search
3.3. Dynamic Main Production Area
3.4. Comparison with Benchmark Models
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Appendix A
Appendix A.1. LSTM Model
Appendix A.2. Attention Mechanism
Appendix A.3. Feature Attention Layer
Appendix A.4. Temporal Attention Layer
References
- Xiong, T.; Li, C.; Bao, Y. Seasonal forecasting of agricultural commodity price using a hybrid STL and ELM method: Evidence from the vegetable market in China. Neurocomputing 2018, 275, 2831–2844. [Google Scholar] [CrossRef]
- Yoo, D.I. Developing vegetable price forecasting model with climate factors. Korean J. Agric. Econ. 2016, 57, 1–24. [Google Scholar]
- Fafchamps, M.; Minten, B. Impact of SMS-based agricultural information on Indian farmers. World Bank Econ. Rev. 2012, 26, 383–414. [Google Scholar] [CrossRef]
- Nam, K.-H.; Choe, Y.-C. A Study on Onion Wholesale Price Forecasting Model. J. Agric. Ext. Community Dev. 2015, 22, 423–434. [Google Scholar] [CrossRef] [Green Version]
- Mirzabaev, A.; Tsegai, D. Effects of weather shocks on agricultural commodity prices in Central Asia. ZEF Discuss. Pap. Dev. Policy 2012, 171. [Google Scholar] [CrossRef]
- Adanacioglu, H.; Yercan, M. An analysis of tomato prices at wholesale level in Turkey: An application of SARIMA model. Custos Agronegocio 2012, 8, 52–75. [Google Scholar]
- Wei, M.; Zhou, Q.; Yang, Z.; Zheng, J. Prediction model of agricultural product’s price based on the improved BP neural network. In Proceedings of the 2012 7th International Conference on Computer Science & Education (ICCSE), Melbourne, VIC, Australia, 14–17 July 2012; pp. 613–617. [Google Scholar] [CrossRef]
- Hemageetha, N.; Nasira, G.M. Radial basis function model for vegetable price prediction. In Proceedings of the 2013 International Conference on Pattern Recognition, Informatics and Mobile Engineering, Salem, India, 21–22 February 2013; pp. 424–428. [Google Scholar] [CrossRef]
- Shin, S.; Lee, M.; Song, S. A Prediction Model for Agricultural Products Price with LSTM Network. J. Korea Contents Assoc. 2018, 18, 416–429. [Google Scholar]
- Li, Y.; Li, C.; Zheng, M. A hybrid neural network and H-P filter model for short-term vegetable price forecasting. Math. Probl. Eng. 2014, 2014, 135862. [Google Scholar] [CrossRef]
- Yin, H.; Jin, D.; Gu, Y.H.; Park, C.J.; Han, S.K.; Yoo, S.J. STL-ATTLSTM: Vegetable price forecasting using stl and attention mechanism-based LSTM. Agriculture 2020, 10, 612. [Google Scholar] [CrossRef]
- Jin, D.; Yin, H.; Gu, Y.; Yoo, S.J. Forecasting of vegetable prices using STL-LSTM method. In Proceedings of the 2019 6th International Conference on Systems and Informatics (ICSAI), Shanghai, China, 2–4 November 2019; pp. 866–871. [Google Scholar]
- Darekar, A.; Reddy, A.A. Cotton price forecasting in major producing states. Econ. Aff. 2017, 62, 373–378. [Google Scholar] [CrossRef]
- Jadhav, V.; Chinnappa Reddy, B.V.; Gaddi, G.M. Application of ARIMA model for forecasting agricultural prices. J. Agric. Sci. Technol. 2017, 19, 981–992. [Google Scholar]
- Pardhi, R.; Singh, R.; Paul, R.K. Price Forecasting of Mango in Lucknow Market of Uttar Pradesh. Int. J. Agric. Environ. Biotechnol. 2018, 11, 357–363. [Google Scholar]
- Assis, K.; Amran, A.; Remali, Y. Forecasting cocoa bean prices using univariate time series models. Res. World 2010, 1, 71. [Google Scholar]
- Wang, S.; Li, C.; Lim, A. Why Are the ARIMA and SARIMA not Sufficient. arXiv 2019, arXiv:1904.07632. [Google Scholar]
- Naidu, G.M.; Sumathi, P.; Reddy, B.R.; Kumari, V.M. Forecasting monthly prices of onion in Kurnool market of Andhra Pradesh employing seasonal ARIMA model. BIOINFOLET Q. J. Life Sci. 2014, 11, 518–520. [Google Scholar]
- Aphinaya, M.; Rathnayake, R.; Sivakumar, S.; Amarakoon, A.M.C. Price Forecasting of Jack Fruit Using Sarima Model. University of Jaffna. 2016. Available online: http://repo.lib.jfn.ac.lk/ujrr/handle/123456789/2028 (accessed on 19 August 2021).
- Mithiya, D. Forecasting of Potato Prices of Hooghly in West Bengal: Time Series Analysis Using SARIMA Model. Int. J. Agric. Econ. 2019, 4, 101. [Google Scholar] [CrossRef] [Green Version]
- Balaji Prabhu, B.V.; Dakshayini, M. Performance Analysis of the Regression and Time Series Predictive Models using Parallel Implementation for Agricultural Data. Procedia Comput. Sci. 2018, 132, 198–207. [Google Scholar] [CrossRef]
- Evans, E.A.; Nalampang, S. Forecasting Price Trends in the U. S. Avocado (Persea americana Mill.) Market. J. Food Distrib. Res. 2009, 40, 37–46. [Google Scholar]
- Zhang, G.P.; Qi, M. Neural network forecasting for seasonal and trend time series. Eur. J. Oper. Res. 2005, 160, 501–514. [Google Scholar] [CrossRef]
- Zhang, G.P.; Kline, D.M. Quarterly time-series forecasting with neural networks. IEEE Trans. Neural Netw. 2007, 18, 1800–1814. [Google Scholar] [CrossRef]
- Weng, Y.; Wang, X.; Hua, J.; Wang, H.; Kang, M.; Wang, F.Y. Forecasting Horticultural Products Price Using ARIMA Model and Neural Network Based on a Large-Scale Data Set Collected by Web Crawler. IEEE Trans. Comput. Soc. Syst. 2019, 6, 547–553. [Google Scholar] [CrossRef]
- Li, Z.-M.; Cui, L.-G.; Xu, S.-W.; Weng, L.-Y.; Dong, X.-X.; Li, G.-Q.; Yu, H.-P. Prediction model of weekly retail price for eggs based on chaotic neural network. J. Integr. Agric. 2013, 12, 2292–2299. [Google Scholar] [CrossRef] [Green Version]
- Huang, G.-B.; Zhu, Q.-Y.; Siew, C.-K. Extreme learning machine: Theory and applications. Neurocomputing 2006, 70, 489–501. [Google Scholar] [CrossRef]
- Wang, J.; Qi, C.; Li, M.F. Prediction of commodity prices based on SSA-ELM. Syst. Eng.-Theory Pract. 2017, 37, 2004–2014. [Google Scholar]
- Bahdanau, D.; Cho, K.; Bengio, Y. Neural machine translation by jointly learning to align and translate. arXiv 2014, arXiv:1409.0473. [Google Scholar]
- Ran, X.; Shan, Z.; Fang, Y.; Lin, C. An LSTM-based method with attention mechanism for travel time prediction. Sensors 2019, 19, 861. [Google Scholar] [CrossRef] [Green Version]
- Zhang, X.; Liang, X.; Zhiyuli, A.; Zhang, S.; Xu, R.; Wu, B. AT-LSTM: An attention-based LSTM model for financial time series prediction. IOP Conf. Ser. Mater. Sci. Eng. 2019, 569, 052037. [Google Scholar] [CrossRef]
- Li, Y.; Zhu, Z.; Kong, D.; Han, H.; Zhao, Y. EA-LSTM: Evolutionary attention-based LSTM for time series prediction. Knowl.-Based Syst. 2019, 181, 104785. [Google Scholar] [CrossRef] [Green Version]
- Qin, Y.; Song, D.; Chen, H.; Cheng, W.; Jiang, G.; Cottrell, G. A dual-stage attention-based recurrent neural network for time series prediction. arXiv 2017, arXiv:1704.02971. [Google Scholar]
- Liu, Y.; Gong, C.; Yang, L.; Chen, Y. DSTP-RNN: A dual-stage two-phase attention-based recurrent neural network for long-term and multivariate time series prediction. Expert Syst. Appl. 2020, 143, 113082. [Google Scholar] [CrossRef]
- KREI OASIS: Outlook & Agricultural Statistics Information System. Available online: https://oasis.krei.re.kr/index.do (accessed on 2 June 2021).
- AT KAMIS: Korea Agricultural Marketing Information Service. Available online: https://www.kamis.or.kr/customer/main/main.do (accessed on 1 July 2021).
- KOSIS: Korean Statistical Information Service. Available online: https://kosis.kr/index/index.do (accessed on 1 July 2021).
- Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [PubMed]
- Zhao, L.; Song, Y.; Zhang, C.; Liu, Y.; Wang, P.; Lin, T.; Deng, M.; Li, H. T-gcn: A temporal graph convolutional network for traffic prediction. IEEE Trans. Intell. Transp. Syst. 2019, 21, 3848–3858. [Google Scholar] [CrossRef] [Green Version]
- Kipf, T.N.; Welling, M. Semi-supervised classification with graph convolutional networks. arXiv 2016, arXiv:1609.02907. [Google Scholar]
Date | Static | Dynamic |
---|---|---|
July 2015 | Gangneung, Teabeak, PyeongChang | Gangneung, Jeongseon, PyeongChange |
August 2015 | Gangneung, Teabeak, PyeongChang | Gangneung, Teabeak, PyeongChang |
September 2015 | Gangneung, Teabeak, PyeongChang | Gangneung, Teabeak, PyeongChang |
Layer Name | Parameter Name | Value |
---|---|---|
LSTM | Unit size | 6 |
Activation function | Tanh | |
Stateful | True | |
Dropout | Dropout rate | 0.2 |
Fully connected | Number of neurons in the 1st FC layer | 10 |
Activation functions in the 1st FC layer | None | |
Number of neurons in the 2nd FC layer | 1 | |
Activation function in the 2nd FC layer | None |
Time Step | Cabbage | Radish | ||
---|---|---|---|---|
RMSE | MAPE | RMSE | MAPE | |
1 | 113.38 | 13.72 | 111.81 | 19.65 |
2 | 88.42 | 10.94 | 48.88 | 8.73 |
4 | 67.03 | 7.81 | 11.91 | 2.56 |
6 | 41.76 | 4.39 | 9.31 | 2.13 |
8 | 59.28 | 4.81 | 23.69 | 4.08 |
12 | 58.73 | 6.65 | 29.94 | 6.54 |
No | Cabbage | Radish | ||||||
---|---|---|---|---|---|---|---|---|
Static | Dynamic | Static | Dynamic | |||||
RMSE | MAPE | RMSE | MAPE | RMSE | MAPE | RMSE | MAPE | |
1 | 88.66 | 11.54 | 7.37 | 0.96 | 33.95 | 8.05 | 13.56 | 3.21 |
2 | 86.83 | 9.29 | 17.95 | 1.92 | 37.83 | 9.78 | 6.98 | 1.80 |
3 | 152.26 | 16.44 | 71.38 | 7.71 | 5.88 | 1.43 | 6.10 | 1.48 |
4 | 12.92 | 2.33 | 38.77 | 6.98 | 2.07 | 0.47 | 8.76 | 2.00 |
Average | 98.43 | 9.90 | 41.76 | 4.39 | 25.61 | 4.93 | 9.31 | 2.13 |
Model | Cabbage | Radish | ||
---|---|---|---|---|
RMSE | MAPE | RMSE | MAPE | |
LSTM | 88.44 (+112%) | 7.75 (+77%) | 33.54 (+260%) | 7.34 (+245%) |
GCN-LSTM [39] | 76.19 (+82%) | 8.92 (+103%) | 21.07 (+126%) | 4.50 (+111%) |
STL-ATTLSTM [11] | 55.81 (+34%) | 6.45 (+47%) | 13.61 (+46%) | 2.89 (+36%) |
DA-RNN [33] | 53.43 (+30%) | 6.34 (+44%) | 16.39 (+76%) | 3.45 (+62%) |
DIA-LSTM (Ours) | 41.76 | 4.39 | 9.31 | 2.13 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Gu, Y.H.; Jin, D.; Yin, H.; Zheng, R.; Piao, X.; Yoo, S.J. Forecasting Agricultural Commodity Prices Using Dual Input Attention LSTM. Agriculture 2022, 12, 256. https://doi.org/10.3390/agriculture12020256
Gu YH, Jin D, Yin H, Zheng R, Piao X, Yoo SJ. Forecasting Agricultural Commodity Prices Using Dual Input Attention LSTM. Agriculture. 2022; 12(2):256. https://doi.org/10.3390/agriculture12020256
Chicago/Turabian StyleGu, Yeong Hyeon, Dong Jin, Helin Yin, Ri Zheng, Xianghua Piao, and Seong Joon Yoo. 2022. "Forecasting Agricultural Commodity Prices Using Dual Input Attention LSTM" Agriculture 12, no. 2: 256. https://doi.org/10.3390/agriculture12020256
APA StyleGu, Y. H., Jin, D., Yin, H., Zheng, R., Piao, X., & Yoo, S. J. (2022). Forecasting Agricultural Commodity Prices Using Dual Input Attention LSTM. Agriculture, 12(2), 256. https://doi.org/10.3390/agriculture12020256