A Comparative Analysis of XGBoost and LSTM Models for Monthly Vegetable Price Prediction in Krishna District of Andhra Pradesh
摘要
Agriculture is the most important source of livelihood and the occupation of most in Andhra Pradesh, which encapsulates 60% of its population. Fluctuations in agricultural markets might perhaps result in instability in earnings from agriculture and thus plunge farmers into financial stress. The National Bank for Agriculture and Rural Development (NABARD) estimated that the average indebtedness per agricultural household was to the tune of ₹ 74,121 in 2020. According to estimates by the Ministry of Food Processing Industries, 30–40% of India’s agricultural produce is lost annually due to inadequate post-harvest infrastructure. Based on climate and price trends, this work discussed using an ensemble learning algorithm and recurrent neural network (RNN) architecture to do vegetable monthly price forecasting. It provides insight into the Extreme Gradient Boosting (XGBoost) algorithm that captures intricate temporal patterns. In contrast, a long short-term memory (LSTM) network is designed to handle long-term dependencies in sequences. Both the models are trained on the rainfall and price data from 2017 through 2022. The XGBoost results in an RMSE value of 100.45, while the Correlation gives a value of 0.97, whereas the LSTM model resulted in an RMSE value of 693.76 with a Correlation of 0.44. Hence, the XGBoost model outperformed the LSTM network and proved more effective in forecasting vegetable prices based on rainfall data.