Keywords

1 Introduction

Agriculture is backbone of the many developing countries of their socioeconomic development and plays important role in the food management and food security [1]. Climate change, soil variability, water use efficiency, precipitation, humidity, topography, crop practice, weeds, pests and biotic stress, etc., are criteria for monitoring crop yield [2]. Crop yield forecast in precision agriculture study is well thought-out of highly significance for optimization of profit and maximization of crop production. Once the yield is location-specifically projected, the farm inputs such as irrigation, pesticide, mechanization and fertilizers supply could be applied variably according to the accepted soil status and crop requirements. Consequently, it is essential to have tools that facilitate to supervise crop growth and estimation crop yield. Ensuring the management of food demand requires proper monitoring, forecasting and estimating agricultural production for the land parcel [3]. Site-specific crop management (SSCM) dealing with precision agriculture (PA) approach that is measuring, observing and responding to inter- and intra-field spatial variability in soils and crops. Precision agriculture study requires more intensive data collection and information, processing in real time and space to take better crop production decisions of farm inputs, maintaining environmental quality [4]. Whipker and Akridge [5] include growth in demand for both technological advances and information supervision services such as, global positioning system (GPS) auto steering guidance (e.g., Real-Time Kinetic technology), fertilizer, variable rate irrigation and robotics, sprayer controllers and real-time decision making based on sensor networks and remote sensing. A reliable and accurate forecasting model for crop yields is of crucial importance for efficient decision making process in the agricultural sector. Here, widely adopted machine learning algorithms in crop yield prediction such as decision trees RF classification [6], support vector machines (SVMs) [7], naïve Bayes [8], k means clustering [9], supervised Kohonen networks (SKNs) [10], eXtreme gradient boosting (XGBoost) [11], light gradient boosting machine (LightGBM) [12], artificial neural networks (ANNs) [13], genetic algorithms (GAs) [14] and ensemble deep neural networks [15] have been used successfully on remotely sensed information in cultivation with high precision. Crop yield modeling is challenging because of the difficulty of the interaction between crop growth and inter- or intra-predictor variables. ANN applied for determining target corn yields using soil properties [16, 17]. According to Noack et al. [18], ANN model is a special network structure with self-adaptive and self-map organizations which contribute to better crop yield estimation as compared to other traditional linear and nonlinear approaches.

The objective of this research work was to deploy three artificial intelligence techniques, SVM, DNN and ANN, as an ordered and monitoring instrument to develop yield prediction model for rice and potato crop in Tarakeswar block, Hooghly, West Bengal, India.

2 Materials and Methods

2.1 Support Vector Machines

Support vector machine (SVM) is a statistical non-parametric, supervised learning approach to classify heterogeneous data that can also be used for regression. SVM is basically designed for binary classification with higher accuracy but can be extended for classification of multiple classes using pair-wise coupling techniques [19]. Main target of the SVM learner has the optimal separation hyperplane (OSH), which is a judgment periphery between classes that reduces classification error in training by having the upper limit margin and afterward generalize to invisible data by kernel functions [20]. According to Vapnik [21], SVM characteristics with nonlinear kernel method is used for model fitting and control the hyperplanes individually grouping sample.

2.2 Artificial Neural Network (ANN)

ANN model applicable between input and output dataset where the data set consists of a linear and highly nonlinear relationship. ANN architecture work out multifaceted problems with one input layer, one output layer and zero or more hidden layer(s). The ANN model has been used for different crop yield prediction such as, rice [22], wheat [16], potato [23], bitter melon [24], corn and soybean [25] and maize [26]. The popularity of SVM is due to its several promising characteristics, such as the kernel trick and structural risk minimization principle [27]. A robust ANN model relies on the appropriate collection of inputs and of representative training and testing datasets. One hidden layer neural network structure to predict rice and potato yield using input variable on climate, soil and farm practice management [28]. The simulation of the neural network process learning two phases: (I) training the network with known datasets and (II) testing the trained network for model generalization with the validation purpose. The study set of the Levenberg–Marquardt algorithm for chosen to train the selected multilayer perceptron (MLP) whose computations and analyzes inbuilt function into the MATLAB nn toolbox. A single layer of output neuron and a single hidden neuron consists of MLPs structure. The MLP function Y essential adjusted across the subsequent linear grouping of multivariate calculation [29] (Eq. 1).

$$Y\left( {x,\omega ,\beta } \right) = G_{2} \left( {\sum\nolimits_{j} {\left[ {\omega_{j} G_{1} \left( {\sum\nolimits_{ij} {\omega_{ij} x_{i} + \beta_{j} } } \right) + \beta } \right]} } \right)$$
(1)

where \(x\) indicates \(i\)th-dimensional involvement trajectory, j represents number of hidden neurons, ω and β are neural weights and biases. The sigmoid tangent activation function \({G}_{1}\) and the linear activation function \({G}_{2}\) [30], are computed as follows (Eq. 2)

$$\begin{gathered} G_{1} (\xi ) = \frac{2}{1 + \exp ( - 2\xi )} - {1} \\ G_{2} (\xi ) = \xi \\ \end{gathered}$$
(2)

where ξ represents weighted sum of evidence from the previous layer of neurons.

The Levenberg–Marquardt backpropagation optimization algorithm [31] coupled with Bayesian regulation used to train MLPs modifies the usual cost function Fe (the sum of squared errors) by considering an additional term, namely the sum of squared neural weights Fω: (Eq. 3).

$$F = \alpha F_{e} + \gamma F_{\omega }$$
(3)

where α and γ are objective function parameters automatically set at their optimum values by the Bayesian regularization proposed by MacKay [32]. Bayesian regulation reduces variance errors because the minimization constrains the weights to small values.

Artificial neural network (ANN) structure was preset up to predict rice and potato yield using inputs twenty-one criteria with 10 number of hidden neurons. The target values consider as yield values for the ANN models in each crop. Error backpropagation (EBP) algorithm training by randomizing the network weights and training set order in the ANNs [33]. Under the EBP algorithm, models are instantiated. All the data were normalized to scale of 0–1 for use in the ANN model. The ANN model was trained and tested with measured yield data (obtained from farmers) from 2017 and 2018 (sites were divided into 70% of training versus 30% of testing sites). In a preliminary analysis, the choice of the variables appeared more significant than the number of neurons in the hidden layer. The most adequate combination of variables was thus searched using three hidden neurons, and the optimum number of neurons in the hidden layer was determined afterwards. All variables were tested individually. The one that yielded the highest model performance was selected.

2.3 Deep Neural Network

Generic AI techniques infrequently have difficulties with overfitting that can be resolved through a demanding optimization method in a deep network architecture which overcome the problem of local minima. Backpropagation algorithm improves accuracy through backward and forward optimization. In these courses, suitable activation functions, such as rectified linear units (ReLU) and sigmoid managed the delinquent of vanishing gradients of loss functions, through the backpropagation development. The parameter optimization model used for tuning of our DNN model. The ‘activation’ function a() is liable for the network scheme’s nonlinearity, and designs the real line to nearly subclass of it. We use the linear activation function (ReLU) found to substantially improve performance over earlier alternatives [34], (Eq. 4):

$$f\left( x \right) = \left\{ {\begin{array}{*{20}l} 0 \hfill & {{\text{for}}\;x < 0} \hfill \\ x \hfill & {{\text{for}}\;x \ge 0} \hfill \\ \end{array} } \right.$$
(4)

which is a variant of the ReLU: a() ()x x = max 0.

Methods that we used for training neural networks and implemented in the TensorFlow Keras sklearn packages in Jupyter notebook. 70% data is spilt into training and testing data for model validation with ‘adam optimization algorithm’ MSE loss function [35]. This loss function is reduced through gradient descent backpropagation algorithm with an iterative method [36] (Eq. 5).

$$R = (\gamma {-}\hat{y} \, )^{2} + \lambda \theta^{T} \theta$$
(5)

where \(\theta \equiv {\text{vec}}\left( {\beta ,\Gamma^{1} ,\Gamma^{2} , \ldots ,\Gamma^{L} } \right)\) and λ denoted tunable hyperparameter. Greater values of λ lead character unbending fits, while values close to zero will typically reason overfitting in higher networks.

2.4 Performance of Model Evaluation

After calibration and validation of the SVM, DNN and ANN model, variables of each farm plot was laid into the model for crop yield prediction per unit area. The performance of the model is evaluated by calculating the root mean square error (RMSE), which gives an estimate of the standard deviation of the residuals (prediction errors), as follows (Eq. 6)

$${\text{RMSE}} = \sqrt {\frac{{\mathop \sum \nolimits_{i = 1}^{n} \left( {Z - ( Z_{i}^{*} )^{2} } \right)}}{n}}$$
(6)

where Zi = observed value of the ith observation; \(Z_{i}^{*}\) is the predicted value of the ith observation; and n = number of points collected. The RMSE tends to place more emphasis on larger errors and, therefore, gives a more conservative measure than the mean absolute error [37].

2.5 Study Region

The study region covers with a total area of 119.93 km2 is located between 22.89° N latitude and 88.02° E longitude and mean elevation of the area is approximately 40 m above sea level (Fig. 1). In the 2011 census, total population of the area was 179,148. The study area is located on old alluvial agro climatic zone. Major growing field crop in kharif season is rice and rabi season is potato. The cropping intensity of the study area is very high and total land use for crop cultivation 63.85%. The total irrigated area was 11,828 ha [38]. The region characterized by moist subhumid type climate with higher growing period of 180–210 days as result of relatively high rainfall and relative humidity, low PET, warm temperature and low relief. The average annual rainfall of 1350–2500 mm and annual temperature ranging from 10 to 41 ℃ [39].

Fig. 1
figure 1

Study area map

2.6 Data Acquisition

In the study area, rice and potato yields are affected by many factors, such as climatic factor, water use efficiency, biotic stress, soil conditions, farm mechanization, terrain distribution and socioeconomic condition. These factors should be measured using appropriate index. A reconnaissance survey of the study area was made in advance of the farming zone for total twenty-one factor such as, soil pH, electrical conductivity (EC), soil organic carbon (SOC), soil texture (ST), available nitrogen (N), available phosphorus (P), available potassium (K), available zinc (Zn), seed rate, mechanization level, irrigation, drainage, pesticide rate, pest affected, source of irrigation, FYM uses, farmer status, NDVI for rice and SAVI or potato, precipitation, temperature, slope and elevation. Various open-source spatial data and secondary information were collected for the proposed crop yield prediction analysis. The elevation and slope degree map of the study area has been produced from the digital elevation model (DEM)—spatial resolution of 30 × 30 m extracted from SRTMGL1_003 in Google Earth Engine code editor. Climatic data TRMM monthly precipitation and temperature data MOD11A1in degree in acquired by the GEE API.

2.7 Image Processing

In our study, GEE utilized the spatial resolution of 10 m Sentinel-2B Multi-Spectral Instrument, Level-1C, Descending direction and orbit number 33, images with filter metadata for rice 2017-10-01 to 2017-10-30 and for potato 2018-01-15 to 2018-02-15, less than 5% cloud cover images using for rice growing season NDVI and potato season SAVI analysis in the study area [40, 41]; (Eqs. 7 and 8).

$${\text{NDVI}} = \left( {{\text{NIR}}{-}{\text{RED}}} \right)/\left( {{\text{NIR}} + {\text{RED}}} \right)$$
(7)
$${\text{SAVI}} = 1.5 \, \left( {{\text{NIR}} - {\text{RED}}} \right)/\left( {{\text{NIR}} + {\text{RED}} + 0.5} \right)$$
(8)

where NIR = near infrared band (band 8), R = red band (band 4).

Vegetation indices (Vis) were verified to be one of the maximum effective indicators of crop growing conditions in the study area. NDVI and SAVI have been widely used in crop monitoring and crop yield applications [42]. We trained the classifiers based on a subset of the farmers’ declarations. Ground truth data  acquired via field inspection were  used to develop the models. All parameters are well-defined for reclassifying raster datasets then the extracted value for further analysis using ArcGIS 10.5 software.

2.8 Yield Data

Average crop yield information and non-spatial attributive data of each and every farm plot was derived from field survey during post-harvest periods using GPS ground truth point coordinate order. For yield map generation, kriging interpolation was selected because it is a non-biased method for predicting the values of criteria between the data points assessed using ArcGIS spatial analyst tools with natural breaks jeans method.

2.9 Soil Nutrient Analysis

Between the years of 2017 and 2018, a soil survey was conducted in the study area, resulting in a detailed within each agricultural farm site; seventy soil samples were collected at five evenly distributed points and then mixed thoroughly to obtain a representative sample according to procedures laid out in the Soil Survey Manuals [43]. Soil samples were collected at depths of 0–30 cm from the study area with the special soil auger system. All sampling positions were located by GPS measurements (GPS III Plus, Garmin, Olathe, Kansas, USA). All seventy soil samples were air-dried, crushed, and then passed through a 2.0 mm sieve and the resulting fine earth (<2.0 mm) was retained for further analysis. Measured soil chemical properties included pH (in water, soil/solution ratio of 1:2.5); available nitrogen, determined using Kjehldahl method [44]; available phosphorus (P), determined using the Olsen method [45]; organic carbon (SOC), determined by Walkely and Black method [46]; available zinc, determined by DTPA method with estimation by Perkin Elmer Atomic Absorption Spectrophotometer (AAS) in ppm. Percentages of sand (>50 μm), silt (2–50 μm) and clay (<2 μm) were determined and used to identify the textural class from the textural USDA triangle using hydrometer [47].

3 Results and Discussion

3.1 Accuracy of Yield Prediction

3.1.1 SVM

SVM-based classification models were used for the yield prediction of rice and potato crop. Experiments have been conducted involving one-against-one multi-classification method, k-fold cross validation and polynomial kernel function for SVM training with the result 95% accuracy level. The model used the residuals values to check model performance and reviewed after training a model, based on the difference between the predicted and true responses in terms of the trend of regression models. After training a regression model, check the predicted response versus record number. Then SVM cross validate results verified the prediction errors for investigating the predicted and true responses without using the corresponding observation. The SVM model produced the least prediction accuracy for rice and potato (RMSE = 1.09 ton/ha and 5.59 t/ha) crop, respectively (Tables 1, 2 and 3).

Table 1 Area statistics for rice yield measured and predicted
Table 2 Area statistics for potato yield measured and predicted
Table 3 Yield prediction performances of SVM, ANN and DNN model

3.1.2 ANN

The supervised ANN was trained with the twenty-one input predictor variables and output yield classes with ten hidden neurons multi-perceptions layer. The best results were structured along with optimum parameters of the artificial neural network modeling for estimating crop yield. In order to test the ability of the neural networks, cross validation was used by leaving 30% of all samples randomly so that after training on the 70% samples, the prediction was verified on this set (Fig. 2, Table 3). In the other hand, ANN model performance of the training, testing and validation performance showing in regression plot gave better agreement than other models (Fig. 2) with 97% accuracy, and R2 value of both the crop are 0.93 and 0.94, respectively. The best overall results for the prediction of rice and potato yield in cross validation and independent validation were obtained from the ANN networks for the prediction of the low-yield category. The accuracy of prediction reached 97% for both cross validation and independent validation (Table 3). Yield maps the distinction finding between measured and predicted yield is revealed (Fig. 3), where the predicted yield is classified into four groups for rice, as high yield (>5 t/ha), moderate yield (4–5 t/ha), marginal yield (3–4 t/ha) and low yield (<3 t/ha); same way for potato yield classes as high yield (>20 t/ha), moderate yield (15–20 t/ha), marginal yield (10–15 t/ha) and low yield (<10 t/ha) built on four equal class of the yield datasets (Tables 1 and 2). High spatial similarity between the measured and the predicted yield for both the crops (Figs. 3 and 4).

Fig. 2
figure 2

ANN model performance in training testing and validation sample a, b, c rice; d, e, f potato

Fig. 3
figure 3

Crop yield maps estimated by ANN model for rice and potato a rice measured b rice predicted c potato measured d potato predicted

Fig. 4
figure 4

Model loss progression during training/validation for a rice and b potato crop

Matsumura et al. [48], reported a close relationship between the predicted yield and the measured yield for maize cultivation in Jilin, China, where the fertilizer and climate variable as a good predictor. Papageorgiou et al. [49] presented that yield classification of field into four different yield categories based on combination of superior predictor variable such as soil, climate and vegetation indices, terrain distribution, local practice and socioeconomic. Uno et al. [50] have utilized remote sensing vegetation indices as crop parameters for predict yield maps similar to our study, where vegetation indices are used, NDVI for rice and SAVI for potato crop as a predictor for crop yield estimation. Area statistics were derived for rice and potato cultivation in Tarakeswar block, Hooghly District for different crops yields, the total area under rice and potato cultivation was also estimated as 281.12 ha (Fig. 3; Tables 1 and 2).

3.1.3 DNN

Srivastava et al. [51] reported that the DNN model output result accuracy improved for crop yield prediction depending upon by fine tuning of hyperparameters optimization level, activation function, layer structure, loss function, intensive optimizer and drop-out ratio. The optimized DNN model produced the highest prediction accuracy for rice and potato (RMSE = 0.20 ton/ha and 0.95 t/ha) with best 98% accuracy for both the crops, respectively (Table 3). Computation power of DNN model is very high due to optimizing the model in local minima within the loss surface. One set of mini batches containing the entire dataset is called ‘epoch.’ Our research work has 30 epochs and batch size 25 to model progression during training validation process for potato and rice crop yield prediction 26.8 and 4.98 t/ha in the study area with the good predictor for yield (Fig. 4).

4 Discussion

These adopted methodology for prediction of rice and potato yield help to provide recommendation to the farmers, decision makers and stakeholders, to take decisions that can make their farming more efficient and profitable [52]. The mean rice and potato yield obtained from the farm plot location was about 4.68 and 18.67 t/ha, whereas the ANN model estimated average rice and potato was 4.74 and 18.28 t/ha. The R2 value was found to be 0.933 (93.3%) and 0.941 (94.1%) with an RMSE of 0.29 and 1.34 t/ha and, which indicates that there is good correlation between the field-measured crop yield and estimated yield. Deep neural networks (DNN) outperformed among the three model; where only support vector machine (SVM) had a sound performance for the training data but low for the validation dataset due to overfitting problem within RMSE and R2 value. DNN model was very well predicting crop yield with low RMSE for the validation dataset nearly for the rice crop (4.98 t/ha) and potato crop (26.98 t/ha) of their respective average yield values. For validation, estimated crop yield values obtained from the model were compared with the field yield value. Training and validation of the model derived the best combination of parameters for estimation of rice and potato crop yield. The scatter plot of the ANN for the predicted versus actual rice and potato yields of training, testing and validation showed better agreement in models’ estimation. Deliberating this content by field examination with the local farmer, and it was exposed that although the low yield zones was acidic soil, low organic carbon, high electrical conductivity, low mechanization level and pest affected issue was accountable for the low yield class in the affected zones.

5 Conclusion

A powerful AI technique, integration of SVM, ANN and DNN, provides an effective tool to crop yield prediction and assesses the contribution of each aspect to the target crop yield. Non-influencing factors are adjusted by the weights of the ANN. Two other AI classifiers, SVM and DNN, were shown to be powerful for the classification and crop yield prediction; however, the remarkable results of AI on the agricultural sector enhance in precession agriculture methodologies. Hence, this tool helps the farmers, decision makers and stakeholders take decisions that can make their farming more efficient and profitable. This research tries to establish an intelligent information and crop yield prediction accuracy analysis in sustainable agriculture development. Future studies AI may concentrate on the calibration and trying of this model in macro-level region of organizing data from systematic ground observations, ground sensors, climate, UAV and RADAR remote sensing. Generalized prediction models for diverse crops utilizing parameters development of operational, real-time calculate optimum N rate prediction, crop water stress, like leaf area index, potential evapotranspiration, chlorophyll content, etc., can be developed on same lines for yield forecast.