Data-Driven Crop Price Prediction: Machine Learning Approach for Agricultural Market Insights
摘要
Accurate crop price prediction is important for developing stable agriculture markets and helping farmers, policymakers, and merchants make well-informed decisions. This study will predict the daily prices of seven key crops including cotton, bajra, rice, wheat, soybean, sugarcane, and onion in six cities of India from August 2023 to August 2024. To capture seasonal trends, city-specific differences, and price shifts, it captures government-published data on daily minimum and maximum prices for every day’s supply and prices. Techniques used are rolling averages and lag features, which increase the detection of underlying trends and improve the prediction accuracy. Types of models tested here are Random Forest, Support Vector Regression, Gradient Boosting: XGBoost and LightGBM, Linear Regression, and Neural Networks, with cross-validation and hyperparameter tuning to allow selection of the best-fit model. The performance of the model is evaluated using R-squared (R2), root mean squared error (RMSE), mean squared error (MSE), and mean absolute error (MAE). Further results establish that some ensemble and stacking methods have provided clearer and accurate prediction results, demonstrating that perhaps the combination of multiple models may sometimes generate more powerful forecasts. These ensemble techniques, together with linear regression, may offer a solid foundation for practical crop price forecasting, thus aiding better planning and decisions in agricultural areas.