Application of machine learning algorithms for prediction of area and production of soybean in Jalgaon district of Maharashtra state
Abstract
Soybean (Glycine max) is an important oilseed crop in India, and its area and production are influenced by weather variability. The present study assessed the performance of machine learning algorithms for weather-based prediction of soybean area and production in Jalgaon district of Maharashtra. A 34-year dataset (1989–90 to 2022–23) comprising soybean area, production and weather parameters, including maximum and minimum temperature, rainfall, relative humidity, wind speed, bright sunshine hours and pan evaporation, was used. The data were obtained from secondary sources and analysed using Python. Ten machine learning algorithms, namely Linear Regression, Ridge Regression, LASSO, Elastic Net, K-Nearest Neighbour, Decision Tree, Random Forest, Extra Trees, Support Vector Regression and Gradient Boosting Regression, were evaluated using the coefficient of determination (R2) and Root Mean Square Error (RMSE). The results indicated substantial variability in soybean area and production during the study period. Wind speed showed significant negative correlations with soybean area (r = −0.84**) and production (r = −0.72**), whereas evening relative humidity exhibited significant positive correlations with area (r = 0.60**) and production (r = 0.51**). Random Forest showed the highest predictive performance for soybean area (R² = 0.9771, RMSE = 17.54), while Extra Trees performed best for soybean production (R² = 0.9680, RMSE = 30.91). Forecasts from the selected models indicated an increasing soybean area from 242.09 hundred hectares in 2023 to 356.35 hundred hectares in 2027, while production was projected to fluctuate between 202.51 and 318.01 hundred tonnes during the forecast period.
Full Text
Tables and figures are in the full-text PDF.
Introduction
Soybean (Glycine max) is important oilseed and pulse crop cultivated worldwide. It is known as miracle crop or yellow jewel. Soybean is basically pulse crop but in India mostly grown as oilseed crop. It contains 42% protein, rich in lysine and 20% oil. Soyabean originated in China and it was introduced to India centuries ago through Himalayan routes, and also brought in via Burma by traders from Indonesia. (Singh, 2006) [1] . In India soybean is grown in various agro-climatic zones including the tropical, sub-tropical and temperate regions. The major soybean growing states are Madhya Pradesh, Maharashtra, Rajasthan, Karnataka, Andra Pradesh and Chhattisgarh (Dinesh K. Agarwal et.al.,2013) [2] . In India, Soybean occupies nearly 112 to 119 lakh hectares with production ranging from 130 to 151 lakh tonnes and productivity of about 983-1063 kg/ha. ((UPAg), SOPA, Research studies, 2025) [3] . The first systematic attempts to develop improved varieties of soybean suitable for Indian environments were made in the early 1900s at the Pusa Agricultural Research Farm in Bihar State, and the work was extended to West Bengal, Uttar Pradesh, Orissa, Punjab, Delhi, Madhya Pradesh, Maharashtra, Tamil Nadu, and Rajasthan (Woodhouse et al., 1913) [4] . In recent years, machine learning has emerged as an effective approach for agricultural forecasting and decision-making by analysing historical data and identifying complex relationships between weather parameters and crop performance. Various machine learning algorithms, including linear regression, decision tree, random forest, support vector regression and other ensemble techniques, have been increasingly applied to predict crop area and production with improved accuracy. Reliable weather-based prediction of soybean area and production can support farmers, researchers and policymakers in crop planning, resource allocation, storage management and market-related decisions. Although several studies have examined the influence of weather parameters on soybean growth and production, relatively limited attention has been given to predicting soybean area and production at the district level using multiple machine learning algorithms. Moreover, the comparative performance of different machine learning algorithms under the agro-climatic conditions of Jalgaon district has not been extensively evaluated. Therefore, assessing suitable machine learning algorithms for weather-based prediction of soybean area and production in Jalgaon district is important for im proving the reliability of agricultural forecasting and supporting effective crop planning and decision-making.
Materials and methods
The study was conducted in Jalgaon district of Maharashtra State using secondary data. A total of 34 years of soybean data pertaining to the district were utilized for the study, covering the period from 1989-90 to 2022-23. Data on soybean area (ha) and production (tonnes) were obtained from the ICRISAT District Level Database and the Directorate of Economics and Statistics (DES), Department of Agriculture and Farmers Welfare, Government of India. Corresponding meteorological data were collected from the India Meteorological Department (IMD) and included maximum temperature, minimum temperature, rainfall, relative humidity, wind speed, bright sunshine hours and evaporation. Python was used for data preprocessing, exploratory data analysis, correlation analysis, evaluation of machine learning algorithms, forecasting and visualization, while Microsoft Excel 2016 was used for data organization and preliminary data management. For soybean, separate analyses were carried out for area and production. The dataset was divided into 80 per cent training and 20 per cent testing data, and the evaluated machine learning algorithms were compared using R 2 and RMSE. The best-fit algorithm was identified based on comparative model performance.
The following machine learning algorithms were used 1. Linear regression
Linear Regression (LR) is a supervised learning method used to describe the linear relationship between a dependent variable and one or more independent variables. It estimates model coefficients by minimizing the differences between observed and predicted values and is widely used for prediction and estimation.
where Ŷ𝑖 is the predicted value, 𝛽 0 is the intercept, 𝛽 𝑗 is the regression coefficient, 𝑋 𝑖𝑗 is the 𝑗 𝑡ℎ predictor, and 𝑝 is the number of predictors.
Ridge regression
Ridge Regression is a regularized linear regression method that uses an L2 penalty to reduce the effect of multicollinearity and overfitting. It shrinks regression coefficients toward zero while retaining all predictors in the model.
where 𝑌 𝑖 is the observed value, Ŷ𝑖 is the predicted value, and 𝜆is the regularization parameter controlling the degree of coefficient shrinkage.
LASSO regression
Elastic net regression
Elastic Net Regression combines the L1 and L2 regularization properties of LASSO and Ridge Regression. It is useful when predictor variables are correlated and variable selection is required. where 𝜆is the regularization parameter and 𝛼is the mixing parameter ranging from 0 to 1.
Extra trees
Extra Trees (Extremely Randomized Trees) is an ensemble learning algorithm that constructs multiple randomized decision trees and combines their predictions. It can capture complex and non-linear relationships between weather parameters and crop area or production.
where 𝑀 is the number of trees and 𝑇 𝑚 (𝑋)represents the prediction from the 𝑚 𝑡ℎ tree.
K-nearest neighbour
K-Nearest Neighbour (KNN) is a non-parametric algorithm that predicts the response variable based on the values of the 𝐾most similar observations. The prediction is obtained by averaging the response values of the nearest neighbours.
where 𝑁 𝐾 (𝑥)represents the set of 𝐾nearest neighbours and 𝑌 𝑖 is the observed value of the neighbouring observation.
Decision tree regression
Decision Tree Regression is a non-parametric supervised learning algorithm that recursively partitions the predictor space into homogeneous groups. It can model non-linear relationships between weather parameters and crop area or production without assuming a predefined functional form.
Ŷ = 𝑓(𝑋)
where 𝑋represents the input weather parameters and 𝑓(𝑋)is the decision-tree-based prediction function.
Random forest
Random Forest (RF) is an ensemble learning algorithm that combines predictions from multiple decision trees to improve predictive performance and reduce overfitting. It can effectively capture non-linear relationships and interactions among weather parameters.
where 𝐵is the number of trees and 𝑇 𝑏 (𝑋)is the prediction from the 𝑏 𝑡ℎ decision tree.
Support vector regression
Support Vector Regression (SVR) is a supervised learning technique used for predicting continuous response variables. It identifies a function that fits the data within a specified epsilon-insensitive margin and can model non-linear relationships through kernel functions.
where 𝐾 ( 𝑋 𝑖 , 𝑋 ) is the kernel function, 𝛼 𝑖 and 𝛼 𝑖 *
are Lagrange multipliers, and 𝑏 is the bias term.
Gradient boosting regression
Gradient Boosting Regression is an ensemble learning technique that sequentially combines weak learners, generally decision trees, to minimize prediction errors. Each successive tree is fitted to the residual errors of the preceding model.
where 𝐹 𝑀 (𝑋)is the final prediction, 𝐹 0 (𝑋)is the initial prediction, ℎ 𝑚 (𝑋)is the 𝑚 𝑡ℎ weak learner, 𝛾 𝑚 is the learning rate, and 𝑀is the number of boosting iterations.
Goodness of fit
The predictive performance of the evaluated machine learning algorithms was assessed using Root Mean Square Error (RMSE) and the coefficient of determination (R 2 ). Higher R 2 and lower RMSE values indicated better agreement between observed and predicted values.
Root mean square error
RMSE measures the magnitude of prediction errors between observed and predicted values and is expressed in the same units as the response variable.
where 𝑌 𝑖 is the observed value, Ŷ𝑖 is the predicted value, and 𝑛is the number of observations.
Coefficient of determination
The coefficient of determination (R 2 ) indicates the proportion of variation in the observed response explained by the model. A value closer to 1 indicates greater agreement between observed and predicted values.
where Ȳis the mean of the observed values.
Result and discussion
Descriptive statistics
Descriptive statistics were computed for soybean area, production and associated weather parameters during 1989-90 to 2022-23. The analysis included mean, median, standard deviation, minimum, maximum, skewness and kurtosis to characterize the central tendency, variability and distributional properties of the variables. , while bright sunshine hours and pan evaporation averaged 7.46 hr and 6.99 mm, respectively. Average annual rainfall was 783.58 mm, with a standard deviation of 231.58 mm, indicating comparatively greater interannual variability. Skewness values ranged from -0.34 to 0.56, suggesting approximately symmetric to moderately skewed distributions. Overall, rainfall exhibited the greatest variability among the weather parameters, whereas maximum temperature showed the least variability during the study period.
Correlation analysis
Correlation analysis for area and production of soybean with weather parameters
Fig. 1 indicated the correlation between area under soybean and weather parameters in Jalgaon district. The wind speed exhibited the significant negative correlation with area under soybean (r= -0.84**), indicated that years with higher average wind speed were generally associated with a lower area under soybean cultivation. Similarly, bright sunshine hours (r = -0.70**) also showed a significant negative correlation indicated that maximum sunshine duration declined significantly area under soybean during study period. In contrast, evening relative humidity (RHII) (r = 0.60**) showed the significant positive correlation followed by pan evaporation (r = 0.32*) with area under soybean. Maximum temperature (r = 0.12), minimum temperature (r = 0.18) and minimum relative humidity (r = 0.20) exhibited non-significant positive correlations, whereas rainfall (r = -0.10) showed a non-significant negative correlation indicated no correlation with area under soybean during study period. Similar results were reported by Bhagat et.al., (2020) [5] on green gram in Jalgaon district, where high variability in wind speed (58.4%) and bright sunshine hours (43.9%) was observed, which indicated that important role of wind speed and bright sunshine hours in influencing area and production of green gram in Jalgaon district of Maharashtra state.
Figure 1. Correlation heatmap for area under soybean with weather parameters
Fig. 2 indicated the correlation between production under soybean and weather parameters in Jalgaon district. The wind speed (r = -0.72**) exhibited the significant negative correlation with production of soybean followed by bright sunshine hours (-0.57**), indicated that years with higher wind speed and longer sunshine duration were generally associated with lower soybean production. Among the positively correlated weather parameters, evening relative humidity (RHII) (r = 0.51**) showed the significant positive correlation with soybean production indicated a moderate positive association between them. The maximum temperature (r = 0.29) and pan evaporation (r = 0.22) exhibited non-significant positive correlations with production. Minimum temperature (r = -0.10), morning relative humidity (RHI) (r = -0.08) and rainfall (r = -0.08) exhibited non-significant negative correlations with soybean production. Similar results were reported by Salau et.al., (2016) [6] in a study on banana production in Ondo state of Nigeria where weather parameters significantly influenced crop productivity, highlighted the important role of weather parameters on crop area and production.
Figure 2. Correlation heatmap for production under soybean with weather parameters
Identification of weather-based prediction model
Different machine learning models were evaluated for predicting the area and production of soybean in Jalgaon district of Maharashtra.
The crop area and production were considered as dependent variables, while the selected weather parameters were used as independent variables. The performance of each model was assessed using the coefficient of determination (R²) and root mean square error (RMSE). A higher R² value, closer to 1, and a lower RMSE value, closer to 0, indicated better predictive performance of the model. The results of the comparative performance of different machine learning models of production under soybean prediction is presented in table 4. The results indicated that Extra trees performed best, achieved the highest R 2 (0.9680) and the minimum RMSE (30.91). This indicated that the extra trees model explained approximately 96.8% of the variability in the observed values and produced rela-tively small prediction error. The random forest model ranked second with, R 2 (0.9432) and RMSE (43.22), indicated that it also provided a strong predictive performance. However, its error was higher than that of extra trees. The Gradient boosting model ranked third, with R 2 (0.8033) and RMSE (80.69), indicated good predictive performance but lower accuracy than Extra trees and Random Forest. Linear regression showed the best performance with, R 2 (0.7966) and RMSE (81.79), followed closely by LASSO (R 2 = 0.7953, RMSE = 82.05) and ridge regression (R 2 = 0.7933, RMSE = 82.44). Elastic net showed comparatively lower performance with, R 2 of 0.7365 and RMSE of 93.10. The Decision tree showed lower predictive performance, with R 2 (0.7061) and RMSE (96.35). The KNN model performed poorly, with R 2 (0.2011) and RMSE (163.03). The SVR model exhibited the poorest predictive performance with a negative R 2 (-0.3281) and the maximum RMSE (209.00).
Validation of best-fit machine learning models
The performance of the best-fit machine learning models was validated by comparing the actual and predicted values of soybean area and production using the training and testing datasets. The dataset was divided into training and testing sets to ensure that both datasets represented the overall data adequately. Furthermore, the validated models were used to forecast soybean area and production for the five-year period from 2023 to 2027. The forecasted values provide an estimate of future soybean area and production based on historical weather conditions and observed patterns.
Validation and forecasting of area under soybean
The original soybean dataset comprised 34 years of observations. After the creation of two lag features, the first two years (1989-90 and 1990-91) could not be assigned lag values because sufficient preceding-year observations were not available. Therefore, these two observations were excluded. The remaining 32 observations were randomly divided into training and testing datasets, with 25 years observations used for training and 7 years observations used for testing. 2. Among the evaluated machine learning algorithms, Random Forest performed best for predicting soybean area (R 2 = 0.9771, RMSE = 17.54), while Extra Trees performed best for soybean production (R 2 = 0.9680, RMSE = 30.91). The selected models showed comparatively higher R 2 and lower RMSE, indicating satisfactory predictive performance.
Acknowledgement
AcknowledgementsThe Department Agricultural Meteorology, College of Agriculture Pune and Department of Agricultural Economics and Statistics, College of Agriculture, Pune, Mahatma Phule Krishi Vidyapeeth, Rahuri, provided research facilities to perform this experiment and statistical analysis, so we are thankful to the departments.
References
- Singh BB. Success of soybean in India: the early challenges and pioneer promoters. Asian Agri-History. 2006;10(1):43-53.
- Agarwal DK, Billore SD, Sharma AN, Dupare BU, Srivastava SK. Soybean: introduction, improvement, and utilization in India problems and prospects. Agricultural Research. 2013;2(4):293300.
- Soybean Processors Association of India (SOPA). Soybean crop estimates and agricultural statistics, 2025. 2025.
- Woodhouse EJ, Taylor CS. The varieties of soybeans found in Bengal, Bihar and Orissa and their commercial possibilities. Memoirs of the Department of Agriculture in India, Botanical Series. 1913;5(103-176).
- Bhagat AA, Bhoge RS, Badgujar HC. Variability analysis and impact of weather parameters on productivity of green gram in Jalgaon district of Maharashtra. International Journal of Farm Sciences. 2020;10(2):23-27.
- Salau OR, Momoh M, Olaleye OA, Owoeye RS. Effects of changes in temperature, rainfall and relative humidity on banana production in Ondo State, Nigeria. World Scientific News. 2016;44(143-154).
- Unified Portal for Agricultural Statistics (UPAg). Agricultural statistics and crop estimates. Ministry of Agriculture and Farmers Welfare, Government of India. 2025.
How this paper connects to the literature. Drag to explore, click any node to open that paper.
