Tomato price forecasting using a stacked LSTM network with global scaling CNN and RC layer
G Sumaiya Farzana 1 and N Prakash2
Department of Computer Science,B. S. Abdur Rahman Crescent Institute of Science and Technology, Chennai, Tamil Nadu,India2
Corresponding Author : G Sumaiya Farzana
Recieved : 15-Mar-2024; Revised : 12-Apr-2025; Accepted : 14-Apr-2025
Abstract
Accurate price prediction is essential across various sectors such as real estate, e-commerce, and finance. Traditional methods often struggle with high-dimensional data and nonlinear patterns. Recent advancements in machine learning (ML), particularly deep learning (DL) techniques such as convolutional neural networks (CNN) and collaborative models like StackNet, offer promising solutions. The proposed approach leverages advanced DL techniques, specifically the global scaling convolutional neural network (GS-CNN) and the StackNet rapid curing (RC) Layer. In this framework, long short-term memory (LSTM) models are organized in a stacked configuration to reduce kernel size and enable effective information flow between layers, thereby achieving optimal predictions with lower error margins for tomato price forecasting. The performance of the proposed model is evaluated using standard error metrics, including mean squared error (MSE), root mean squared error (RMSE), mean absolute error (MAE), and the coefficient of determination (R²). The experimental results indicate that the model achieves an MSE of 0.0046, RMSE of 0.06, MAPE of 0.2753, MAE of 0.05, and an R² value of 0.83. These outcomes confirm the effectiveness and adaptability of the proposed approach in accurately forecasting tomato prices with minimal error rates. However, limited knowledge of underlying market dynamics may still constrain prediction accuracy. While the proposed model demonstrates low error rates, further improvement is possible by incorporating larger and more diverse datasets to enhance predictive performance.
Keywords
Price prediction, Deep learning, StackNet-RC, Global scaling CNN, Tomato forecasting, Stacked LSTM.
References
[1] Haybron DM. Well-being policy: consensus hallmarks and cultural variation. In beyond classical liberalism 2024 (pp. 205-21). Routledge India.
[2] Deepalakshmi R, Devi SP, Revathy JS, Shalini TG. Scheming a new algorithm for dynamic price prediction of vegetable commodities using statistical price prediction technique. International Journal of Computational Complexity and Intelligent Algorithms. 2019; 1(2):117-28.
[3] RL M, Mishra AK. Forecasting spot prices of agricultural commodities in India: application of deep‐learning models. Intelligent Systems in Accounting, Finance and Management. 2021; 28(1):72-83.
[4] Pujari VM. A machine learning approach for tomato crop yield and price prediction. Journal of Advanced Zoology. 2023; 44: 517-23.
[5] Yin H, Jin D, Gu YH, Park CJ, Han SK, Yoo SJ. STL-ATTLSTM: vegetable price forecasting using STL and attention mechanism-based LSTM. Agriculture. 2020; 10(12):1-17.
[6] Ge J, Zhao L, Yu Z, Liu H, Zhang L, Gong X. Prediction of greenhouse tomato crop evapotranspiration using XGBoost machine learning model. Plants. 2022; 11(15):1-17.
[7] Gulati A, Juneja R. Transforming Indian agriculture. Indian Agriculture Towards. 2022; 2030:9-37.
[8] Prajwal CY, Chandan KS, Likith S, Poorna PMS, Santhosh B. Crop price prediction using deep learning. In ICT infrastructure and computing: proceedings of ICT4SD 2022 (pp. 297-302). Springer Nature Singapore.
[9] Dong S, Mo K. Analysis of factors for vegetable price fluctuation in Luan. In exploring the financial landscape in the digital age 2024 (pp. 456-62). CRC Press.
[10] Murugesan R, Mishra E, Krishnan AH. Forecasting agricultural commodities prices using deep learning-based models: basic LSTM, Bi-LSTM, stacked LSTM, CNN LSTM, and convolutional LSTM. International Journal of Sustainable Agricultural Management and Informatics. 2022; 8(3):242-77.
[11] Yuan CZ, Ling SK. Long short-term memory model based agriculture commodity price prediction application. In proceedings of the 2nd international conference on information technology and computer communications 2020 (pp. 43-9). ACM.
[12] Banerjee T, Sinha S, Choudhury P. Long term and short term forecasting of horticultural produce based on the LSTM network model. Applied Intelligence. 2022:1-31.
[13] Yue Y, Li JH, Fan LF, Zhang LL, Zhao PF, Zhou Q, et al. Prediction of maize growth stages based on deep learning. Computers and Electronics in Agriculture. 2020; 172:105351.
[14] Chaudhary M, Gastli MS, Nassar L, Karray F. Deep learning approaches for forecasting strawberry yields and prices using satellite images and station-based soil parameters. Proceedings of the AAAI spring symposium on combining machine learning and knowledge engineering (AAAI-MAKE) 2021 (pp. 1-12). CEUR.
[15] Okwuchi I. Machine learning based models for fresh produce yield and price forecasting for strawberry fruit. Masters Thesis, University of Waterloo. 2020.
[16] Murugesan R, Mishra E, Krishnan AH. Forecasting agricultural commodities prices using deep learning-based models: basic LSTM, bi-LSTM, stacked LSTM, CNN LSTM, and convolutional LSTM. International Journal of Sustainable Agricultural Management and Informatics. 2022; 8(3):242-77.
[17] Kankar M, Kumar MA. Price prediction of agricultural products using deep learning. In advanced machine intelligence and signal processing 2022 (pp. 505-18). Springer Nature Singapore.
[18] Mahto AK, Alam MA, Biswas R, Ahmed J, Alam SI. Short‐term forecasting of agriculture commodities in context of Indian market for sustainable agriculture by using the artificial neural network. Journal of Food Quality. 2021; 2021(1):1-13.
[19] Abewickrama G. Analyzing and predicting the market price of fruits and vegetables. BSc. Dissertation, Informatics Institute of Technology, Delhi, India. 2022.
[20] Banerjee S, Mondal AC. An ingenious method for estimating future crop prices that emphasises machine learning and deep learning models. International Journal of Information Technology. 2023; 15(8):4291-313.
[21] Kaewchada S, Ruang-on S, Kuhapong U, Songsri-in K. Random forest model for forecasting vegetable prices: a case study in Nakhon Si Thammarat Province, Thailand. International Journal of Electrical and Computer Engineering. 2023; 13(5):5265-72.
[22] Priyadarshi R, Panigrahi A, Routroy S, Garg GK. Demand forecasting at retail stage for selected vegetables: a performance analysis. Journal of Modelling in Management. 2019; 14(4):1042-63.
[23] Weng Y, Wang X, Hua J, Wang H, Kang M, Wang FY. Forecasting horticultural products price using ARIMA model and neural network based on a large-scale data set collected by web crawler. IEEE Transactions on Computational Social Systems. 2019; 6(3):547-53.
[24] Li B, Ding J, Yin Z, Li K, Zhao X, Zhang L. Optimized neural network combined model based on the induced ordered weighted averaging operator for vegetable price forecasting. Expert Systems with Applications. 2021; 168:114232.
[25] Lu H, Ma X, Huang K, Azimi M. Carbon trading volume and price forecasting in China using multiple machine learning models. Journal of Cleaner Production. 2020; 249:119386.
[26] Yang W, Wang J, Niu T, Du P. A novel system for multi-step electricity price forecasting for electricity market management. Applied Soft Computing. 2020; 88:106029.
[27] Bhavani M, Mounika P. A novel model selection framework for forecasting agricultural commodity prices using time series features and forecast horizons. International Journal of Scientific Research in Science and Technology. 2022; 9(5):134-44.
[28] Babu KS, Mallikharjuna RK. Onion price prediction using machine learning approaches. In proceedings of international conference on computational intelligence and data engineering: ICCIDE 2021 (pp. 175-89). Springer Nature Singapore.
[29] Areef M, Rajeswari S, Vani N, Naidu GM. Price behaviour and forecasting of onion prices in Kurnool market, Andhra Pradesh State. Economic Affairs. 2020; 65(1):43-50.
[30] Areef M, Rajeswari S, Vani N, Naidu GM. Forecasting of onion prices in Bangalore market: an application of time series models. Indian Journal of Agricultural Economics. 2020; 75(2):217-27.
[31] Baser P, Saini JR, Kotecha K. Tomconv: an improved CNN model for diagnosis of diseases in tomato plant leaves. Procedia Computer Science. 2023; 218:1825-33.
[32] Badal PS, Goyal A, Kamalvanshi V, Kumar P, Mondal B. Tomato price forecasting-a comparison between ARIMA, GARCH and ANN. Agro-Economist. 2023; 10(1):89-96.
[33] Reddy GT, Murthy BR, Umar SN, Prakash KK. Forecasting models for arrivals and prices of tomato at selected markets in Kurnool district of Andhra Pradesh. International Journal of Agricultural and Statistical Sciences. 2022; 18(1):1695-701.
[34] Khanum R. Forecasting of tomato prices using long short term memory. Indian Journal of Agricultural Marketing. 2023; 37(3spl):179-80.
[35] Kasimatis CN, Psomakelis E, Katsenios N, Katsenios G, Papatheodorou M, Vlachakis D, et al. Implementation of a decision support system for prediction of the total soluble solids of industrial tomato using machine learning models. Computers and Electronics in Agriculture. 2022; 193:106688.
[36] Belouz K, Nourani A, Zereg S, Bencheikh A. Prediction of greenhouse tomato yield using artificial neural networks combined with sensitivity analysis. Scientia Horticulturae. 2022; 293:110666.
[37] Chen W, Zhang H, Mehlawat MK, Jia L. Mean–variance portfolio optimization using machine learning-based stock price prediction. Applied Soft Computing. 2021; 100:106943.
[38] Jain A, Marvaniya S, Godbole S, Munigala V. Towards context-based model selection for improved crop price forecasting. In proceedings of the 5th joint international conference on data science & management of data (9th ACM IKDD CODS and 27th COMAD) 2022 (pp. 195-203). ACM.
[39] Tao KF, Min AN, Wei SU, Fang LJ, Lin HU, Shan CS. A dataset of the statistics on tomato transaction price in the wholesale market in Beijing-Tianjin-Hebei region from 2012 to 2019. Journal of Agricultural Big Data. 2023; 5(2):62-7.
[40] Haikal R, Wahyudi M, Pujiastuti L, Solikhun S. Fletcher-reeves algorithm for predicting the quantity of production tomato plants in Indonesia. International Journal of Mechanical Computational and Manufacturing Research. 2022; 11(3):109-20.
[41] Murugesan G, Radha B. An extrapolative model for price prediction of crops using hybrid ensemble learning techniques. International Journal of Advanced Technology and Engineering Exploration. 2023; 10(98):1-20.
[42] Gastli MS, Nassar L, Karray F. Deep learning models for strawberry yield and price forecasting using satellite images. In international conference on systems, man, and cybernetics (SMC) 2021 (pp. 1790-6). IEEE.
[43] Paul RK, Yeasin M, Kumar P, Kumar P, Balasubramanian M, Roy HS, et al. Machine learning techniques for forecasting agricultural prices: a case of brinjal in Odisha, India. Plos One. 2022; 17(7):1-17.
[44] Sabu KM, Kumar TM. Predictive analytics in agriculture: forecasting prices of arecanuts in Kerala. Procedia Computer Science. 2020; 171:699-708.
[45] Nayak GH, Alam MW, Avinash G, Singh KN, Ray M, Kumar RR. N-BEATS deep learning architecture for agricultural commodity price forecasting. Potato Research. 2024:1-21.