Introduction

The potato (Solanum tuberosum L.) is an important source of several nutrients including vitamins, such as Vitamin C and B6, and minerals, such as iron and potassium. It is a significant crop in Iran, grown in almost every province. The provinces that produce the largest potato crops are Hamedan, Tabriz and Mashad. In Iran, potatoes were grown on approximately 185,000 hectares in 2012 (Anonymous 2012).

In any form of agriculture, energy plays a fundamental role. All phases of agriculture, from tillage to transporting the harvest to the market, require energy (Rykaczewska 2015; Larkin and Halloran 2010). The types of energy consumption in agriculture can be defined as direct or indirect. Direct energy consumption occurs when energy is used to operate machinery, control the temperature in farm buildings, and provide artificial light. Examples of indirect energy consumption include the energy used to fabricate fertilizers, pesticides, herbicides, and farm machinery, and to produce seeds (Ozkan et al. 2004). Population growth, the decreasing availability of arable land, and the rising standard of living have all increased the demand for energy by agriculture (Esengun et al. 2007). Discovering the relationship between energy inputs and output affords the data required to create policies that would optimize resources, encourage renewable energy use, and expand sustainable farming (Brown et al. 2014). The relationship between energy input and output in the production of several crops including cucumbers (Bolandnazar et al. 2014), basil (Pahlavan et al. 2012), chickpeas (Salami and Ahmadi 2010), grapes (Rajabi-Hamedani et al. 2011), canola (Taherri-Garavand et al. 2010), barley (Mobtaker et al. 2010), and garlic (Samavatean et al. 2011) has been investigated in several studies. Energy input and output prediction benefits farmers, governments, and related agricultural industries.

Food production is extremely important to governments due to the role it plays in national security. Internal prognosticators allow governments to create polices that can benefit agriculture in terms of technical and market assistance (Geoffrey 1994). Adaptive neuro-fuzzy inference systems (ANFIS) are often used by researchers. For example, Akbarzadeh et al. (2009) used ANFIS to develop a soil erosion model. Krueger et al. (2011) also used ANFIS to model root distribution patterns, while Khoshnevisan et al. (2014) assessed the ability of ANFIS models to predict wheat yield based on energy inputs. There is a need for a system that can help analyze energy input and output in predicting potato production.

In this study, ANFIS is used to examine energy input and output for predicting potato yield. The inputs of human labor, diesel, fertilizers (manmade and manure from farm animals), chemical additives, machinery, water and seeds are analyzed separately. There are currently no studies in which the relationship between energy input, output and potato yield is modeled with support vector regression (SVR). Thus, one of the primary goals of this study is to determine whether ANFIS or SVR is more effective for predicting yield based on energy inputs.

Initially, an ANFIS network was used to find the parameter with the strongest influence on yield. This process is known as “variable selection” and serves to find subsets of the full set of variables that are potentially good predictors (Castellano and Fanelli 2000; Dieterle et al. 2003; Cibas et al. 1996; Andersson et al. 2000). One variable selection method is to use previous knowledge to eliminate variables that are not relevant. Another, more advanced technique is to view variable selection as an optimization procedure where genetic algorithms can be exploited (Sofge 2002). In these cases, the goal is to select input variables that can reduce the error between the predicted output variables. ANFIS, among the most powerful neural network systems (Gocić et al. 2015a; Kwong et al. 2009), is employed for variable selection in this study.

ANFIS was used to monitor the variables and identify the significant energy inputs with respect to potato production. The three most significant variables were selected and applied to develop an ANFIS model. ANFIS is a robust tool favored by researchers for modeling (Al-Ghandoor and Samhouri 2009; Petković et al. 2012a, b; Petković and Ćojbašić 2012), making predictions (Hosoz et al. 2011; Gocić et al. 2015b; Sivakumar and Balu 2010) and control in engineering systems (Kurnaz et al. 2010; Ravi et al. 2011; Khoshnevisan et al. 2015; Petković et al. 2012a, b; Tian and Collins 2005). ANFIS facilitates a fuzzy modeling procedure to gather data (Aldair and Wang 2011) and it can also be used to organize fuzzy inference systems using input/output data pairs. The next step in our study was to compare ANFIS and SVR results (Sivapragasam et al. 2001). SVR algorithms work well for regression problems but do not account for error approximation in the data or the generalized model. These algorithms rely on a structural risk minimization principle and statistical learning theory (Yang et al. 2009; Zhang et al. 2013). Three kernel functions were used in this work in addition to the SVR scheme. The radial basis (SVR_rbf), polynomial (SVR_poly), and linear (SVR_linear) functions were used to develop a function that can estimate potato production.

Materials and Methods

Data Collection

Fifty potato producers from the province of Hamedan participated in this study. Hamedan is located at 36° 40′ latitude and 48° 31′ longitude. It receives average rainfall of 317.7 mm and has mean average temperature of 11.3 °C.

The 50 farmers were randomly selected to take part in a face-to-face questionnaire, in which questions related to potato cultivation from 2010 to 2011 were asked. Sample size was determined with the Neyman technique (Zangeneh et al. 2011). The farmers were asked about their practices in terms of manual labor, diesel, fertilizers, chemicals, water, machinery, and manure from farm animals (energy inputs) to produce a potato crop (energy output). The energy input was quantified per hectare, and this value was multiplied by the coefficient of the energy equivalent. The energy equivalent for both the inputs and output was changed into energy per unit area (Table 1). For example, the energy equivalent for machinery was found using the following equation:

Table 1 Energy equivalent of inputs and output in agricultural production
$$ \mathrm{ME}=\mathrm{E}\frac{\mathrm{G}}{\mathrm{T}} $$

where ME indicates energy used by machines (MJh−1), E denotes the equivalent energy used in the machinery production (MJkg−1), G is the machine weight in kg, and T signifies the economic life of the machine (h). In this study, the energy input was 92225.11 MJha−1 and the output was 103009.2 MJha−1. Renewable energy comprised 34561.59 MJha−1 compared to 57663.52 MJha−1 of non-renewable energy. Table 2 summarizes the energy inputs.

Table 2 The input energy values and their percentage of the total energy input

Neuro-Fuzzy Computing

Soft computing is an innovative approach to constructing computationally intelligent systems that possess humanlike expertise within a specific domain. These systems are supposed to adapt in changing environments, learn to do better and explain their decision-making process. It is usually more beneficial to employ several computing methods in a synergistic way rather than building a system based exclusively on one technique. This is useful in confronting real-world computing problems. The result of such synergistic use of computing techniques is the development of complementary hybrid intelligent systems. The epitome of designing and constructing intelligent systems of this kind is neuro-fuzzy computing: first, neural networks recognize patterns and adapt to cope with evolving environments; second, fuzzy inference systems include human knowledge to implement decision-making and differentiation. Combining and integrating these two complementary methodologies produces a novel discipline called neuro-fuzzy computing.

Adaptive Neuro-Fuzzy Inference Systems

ANFIS (adaptive neuro-fuzzy inference systems) is a class of adaptive networks functionally equivalent to fuzzy inference systems. In this study, the fuzzy inference system utilized has three inputs, x, y and z, and one output, f. The first-order Sugeno fuzzy model with two fuzzy if-then rules was applied as follows:

$$ \begin{array}{c}\hfill Rule\ 1: if\ x\ is\ A\ and\ y\ is\ C\ and\ z\ is\ E\ then\ {f}_1 = {p}_1x+{q}_1y+{r}_1z+s\hfill \\ {}\hfill Rule\ 2: if\ x\ is\ B\ and\ y\ is\ D\ and\ z\ is\ E\ then\ {f}_2 = {p}_2x+{q}_2y+{r}_2z+s\hfill \end{array} $$
(1)

The ANFIS architecture for three inputs (x, y and z) is shown in Fig. 1. Nodes in the same layer have similar functions. The output of the ith node in layer l is denoted as O l,i .

Fig. 1
figure 1

ANFIS Structure

The first layer consists of input variable membership functions (MFs) and it supplies the input values to the next layer. Every node i is an adaptive node with a node function.

$$ \begin{array}{c}\hfill {O}_{l,i}={\mu}_{Ai}(x),\hfill \\ {}\hfill {O}_{l,i}={\mu}_{Ci-2}(y),\hfill \\ {}\hfill {O}_{l,i}={\mu}_{Ei-4}(z),\hfill \end{array}\begin{array}{c}\hfill for\ i-1,2,\mathrm{or}\hfill \\ {}\hfill for\ i-3,4,\mathrm{or}\hfill \\ {}\hfill for\ i=5,6\hfill \end{array} $$
(2)

where x or y or z is the input to node i and A i or B i-2 or E i-4 is an associated linguistic label (such as ‘small’ or ‘large’). In other words, O l,i is the membership grade of a fuzzy set A, C and E = A 1, A 2, C 1, C 2, E 1, E 2, which stipulates the extent to which the specified input x or y or z satisfies the quantifier A, C or E. In this instance, the membership function can be any suitable parameterized membership function. Membership functions are represented by μ Ai (x), μ Ci − 2(y), μ Ei − 4(z). The generalized bell function is used here, as it is best able to generalize nonlinear parameters:

$$ {\mu}_{Ai}(x)=\frac{1}{1+{\left(\frac{x-{C}_i}{a_i}\right)}^{2{b}_t}} $$
(3)

where {a i , b i , c i } is the variable set. The bell-shaped function varies accordingly as the values of the variables change, therefore manifesting different types of membership functions for fuzzy set A. Variables in the first layer are called premise variables.

The second layer (membership layer) multiplies incoming signals from the first layer and sends the product out. Each node in the 2nd layer is a fixed node and its output is the resultant of all incoming signals:

$$ \begin{array}{cc}\hfill {O}_{2,i}={w}_i={\mu}_{Ai}(x){\mu}_{Ci-2}(y){\mu}_{Ei-4}(z),\hfill & \hfill i=1,2\hfill \end{array} $$
(4)

The third layer (i.e., rule layer) is non-adaptive, where every node i calculates the ratio of the rule’s firing strength to the sum of all rules’ firing strengths as:

$$ {O}_{3,i}={w}_i^{*}=\frac{w_i}{w_1+{w}_2},i=1,2. $$
(5)

The outputs of this layer are called normalized firing strenghts or normalized weights.

The fourth layer (i.e., defuzzification layer) provides the output values resulting from the inference of rules, where every node i is an adaptive node with the node function:

$$ {O}_{4,i}={w}_i^{*}\cdot {f}_i={w}_i^{*}\left({p}_ix+{q}_iy+{r}_i\right) $$
(6)

where {p i , q i , r i ,} are the consequent parameters.

The fifth layer sums up all inputs from the fourth layer and converts the fuzzy classification results into a crisp output. The node in the fifth layer is not adaptive and computes the overall output of all incoming signals:

$$ {O}_{5,i}={\displaystyle \sum_i{w}_i^{*}}\cdot {f}_i=\frac{{\displaystyle \sum_i{w}_i}\cdot {f}_i}{{\displaystyle \sum_i{w}_i}} $$
(7)

The parameters in the ANFIS architecture were identified by applying the hybrid learning algorithm. In the forward pass of this algorithm, functional signals go forward until Layer 4. Consequent parameters are identified by the least squares estimate. In the backward pass, the error rates propagate backwards and premise parameters are updated by gradient descent.

Supervised Vector Machines (SVM)

An SVM is a learning technique from the linear classifier family. The formula includes structural risk minimization (SRM) logic, which is very different from the empirical risk minimization (ERM) method used in statistical learning techniques. For instance, SRM eases the maximum bound on a generalization error but ERM creates the lowest error in the training data. SVMs are more likely to be generalized and their global optimum is assured (Chen et al. 2010; Yang et al. 2014; Raghavendra and Deka 2014).

A Radial Basis Function as a Kernel

SVM uses kernel functions to chart data to a higher dimensional feature space -- a characteristic that accounts for the SVM flexibility (Wang et al. 2010; Ayat et al. 2005). In higher dimensional feature spaces, linear solutions are comparable to non-linear solutions in the initial, lower dimensional input space. This attribute makes SVM an appropriate choice for examining issues related to hydrology that are non-linear in nature. A few methods use non-linear kernels for working with regression problems while using SVMs. The radial basis function (RBF) is a compressed supported kernel, appropriate for restricting the computation training process, thus allowing SVM to be compared with other probable kernel features. In this study, RBF with a σ parameter was used.

Support Vector Regression (SVR)

SVR was designed to discover which function has the highest number of ε deviations from the actual destination vector for flat training data (Yousefi et al. 2015; Ju and Hong 2013). Non-linear support vector regression is discovered by the kernel function. SVR requires the user to define the kernel-specific parameters. SVR also requires for the size error in ε and the best values of the legalization argument C to be established. SVR has the advantage of an algorithm that incorporates the outcome of the quadratic programming function, resulting in unique, superior, and complete solutions.

The training data is expressed as {x i , y i } N i = 1 , where xi ϵℜ p identifies the ρ-dimensional input vector and yi ϵℜ denotes a scalar measured output that indicates the system’s output. The purpose here is to establish a function that indicates the degree of dependency of y i on the input x i . This function can be stated as y = f(x) and the linear function y can be described as:

$$ y={w}^T\varphi (x)+b $$
(8)

where w represents the weight vector and b signifies the bias. A non-linear mapping function is ϕ (.) The mapping function takes the original input data and places it in a high-dimensional space that moves non-linear separable problems into linearly separable space. The non-linear function that maps data to a higher dimensional feature space is ϕ (.) = p h. Equations 9 and 10 describe the optimization problem and equality constraints:

$$ \min\ j\left(w,e\right)=\frac{1}{2}{w}^Tw+\gamma \frac{1}{2}{\displaystyle \sum_{i=1}^N{e}_i^2} $$
(9)

subject to

$$ {y}_i={w}^T\phi \left({x}_i\right)+b+{e}_i,i=1,\dots, N $$
(10)

In these equations, e t represents the random error and y ϵℜ + signifies the regularization parameter for optimizing the compromise between minimizing training errors and the model’s complexity. The purpose of seeking optimal parameters is to decrease the regression model’s prediction errors. The optimal model was selected by decreasing the cost function where e t is minimized. This formula relates to the regression high-dimensional feature space. The possibly infinite nature of this space means there is no easy solution to this problem. To address this issue, the Lagrange function is expressed as follows:

$$ L\left(w,b,e;\alpha \right)=J\left(w,e\right)-{\displaystyle \sum_{i=1}^N{\alpha}_i\left\{{w}^T\phi \left({x}_i\right)+b+{e}_i-{y}_i\right\}} $$
(11)

The answer to Eq. 9 can be obtained by making partial differentiation considering w, b, e; α, as demonstrated below:

$$ \frac{\partial L}{\partial w}=0\to w={\displaystyle \sum_{i=1}^N{\alpha}_i\phi \left({x}_i\right)} $$
(12)
$$ \frac{\partial L}{\partial b}=0\to b={\displaystyle \sum_{i=1}^N{\alpha}_i=0} $$
(13)
$$ \begin{array}{cc}\hfill \frac{\partial L}{\partial {e}_i}=0\to {\alpha}_i=y\hfill & \hfill {e}_i,i=1,\dots, N\hfill \end{array} $$
(14)
$$ \frac{\partial L}{\partial {x}_i}=0\to {w}^T\phi \left({x}_i\right)+{e}_i-{y}_i=0,i=1,\dots, N $$
(15)

The assumed values for b and α i (b a, α i a) can be found by answering the linear system. The resulting model is described as:

$$ y=f(x)={\displaystyle \sum_{i=1}^N{\alpha}_i^aK\left(x,{x}_i\right)+{b}^a} $$
(16)

where K(x, x i ) defines the kernel function. In this study, the non-linear RBF kernel is written as:

$$ K\left(x,{x}_i\right)= exp\left(-\frac{1}{\sigma^2}{\left\Vert x-{x}_i\right\Vert}^2\right) $$
(17)

In Eq. 16, σ indicates the kernel function parameter of the RBF kernel.

The regularization parameter is important to the model and it establishes a compromise between minimizing the fitting error and the smoothness of the estimated function. While running the calibration model, the kernel function value decreased. Using SVR was proposed in this work to create a model for predicting potato production. To develop the proposed SVR model, care was taken to establish the SVR parameters. Rather than decreasing observable training errors, SVR minimizes generalization errors, which is bound to improve the generalized performance.

Results and Discussion

Energy Use Patterns

The energy use patterns and final potato yield amounts are summarized in Table 2. The average values for manual labor, diesel, chemical fertilizers and manure from farm animals, chemicals and water were 571.91, 19314.63, 35725.38, 6612, 366.92 and 13550.06 MJha−1, respectively. The energy use pattern shows that nitrogen fertilizer (35.62 %), diesel (20.94 %) and water (14.69 %) comprised most of the energy for potato production in this area. The high fertilizer use is attributed to the mistaken belief held by many farmers that crop yield will increase in proportion to the amount of fertilizer used. Additionally, the high diesel and water consumption can be attributed to using the wrong type or inefficient machinery relative to farm size.

The total energy input needed for potato production in this study reached 92225.11 MJha−1 and the output was 103009.2 MJha−1. The energy input applied in the current study can be classified as either renewable or non-renewable. The non-renewable energy inputs include diesel, chemicals, chemical fertilizers, and machinery, which account for 62.52 % of the total energy input. The renewable energy input accounted for only 37.48 % of the total energy input. These results are in agreement with the outcome of previous, similar studies. For example, Khoshnevisan et al. (2014) found that 85 % of the energy consumed in wheat production is from non-renewable resources. Additionally, Samavatean et al. (2011) discovered that 63.26 % of the energy input for garlic production was from non-renewable resources.

In this study, the available inputs were scrutinized to determine the optimal combination of energy inputs with the most influence on output. To accomplish this, ANFIS was employed with functions to build a model for each combination of input functions with a training period of one epoch, after which the performance results were reported (Fig. 2). Input 6 (Machinery) had the most influence on potato yield. Figure 2 also shows that the least error was the most relevant with respect to output.

Fig. 2
figure 2

Every input parameter’s influence on production yield

The graph and results in Fig. 2 indicate that input variable 6 is the most influential parameter on predicting potato production.

Similar training and checking error indicate there was no over-fitting, meaning that the ANFIS model can be built using more than one input parameter. To verify this claim, a search was performed to look for the optimal combinations of 2 and 3 input parameters as shown in Table 3. According to Table 3, input combinations 4 & 6 and 3, 5 & 6 were the optimal combinations for potato production. Simple models with simple structures are always preferable, thus avoiding using more than two inputs in the model. Chemicals, manual labor, and machinery served as input parameters for the original training and checking datasets.

Table 3 ANFIS regression errors for the potato production prediction

An ANFIS model was developed for potato yield prediction after choosing the three most optimal parameters. The scheme used by the algorithm for selection and estimation is shown in Fig. 3. The ANFIS selection and estimation are also illustrated in Fig. 3.

Fig. 3
figure 3

ANFIS selection and detection of potato production yield

The ANFIS decision surfaces for estimating production with the three optimal parameters are represented in Fig. 4.

Fig. 4
figure 4

ANFIS decision surfaces for potato production yield estimation: input1: Chemicals, input2: Human labor and input3: Machinery

Finally, a SIMULINK block diagram was generated to illustrate the ANFIS estimation of potato yield (Fig. 5).

Fig. 5
figure 5

SIMULINK block diagram for ANFIS prediction of potato yield

Model Performance Evaluation

In this study, ANFIS and SVR models were compared. Linear, polynomial, and radial basis kernel functions were used with the SVR model. To compare the ANFIS, SVR_rbf, SVR_poly, and SVR_linear models, the statistical indicators shown below were employed:

  1. 1)

    root-mean-square error (RMSE)

    $$ RMSE=\sqrt{\frac{{\displaystyle \sum_{i=1}^n{\left({P}_i-{O}_i\right)}^2}}{n}}, $$
    (18)
  2. 2)

    Pearson correlation coefficient (r)

    $$ \mathrm{r}=\frac{\mathrm{n}\left({\displaystyle \sum_{\mathrm{i}=1}^{\mathrm{n}}{\mathrm{O}}_{\mathrm{i}}\cdot {\mathrm{P}}_{\mathrm{i}}}\right)-\left({\displaystyle \sum_{\mathrm{i}=1}^{\mathrm{n}}{\mathrm{O}}_{\mathrm{i}}}\right)\cdot \left({\displaystyle \sum_{\mathrm{i}=1}^{\mathrm{n}}{\mathrm{P}}_{\mathrm{i}}}\right)}{\sqrt{\left(\mathrm{n}{\displaystyle \sum_{\mathrm{i}=1}^{\mathrm{n}}{\mathrm{O}}_{\mathrm{i}}^2}-{\left({\displaystyle \sum_{\mathrm{i}=1}^{\mathrm{n}}{\mathrm{O}}_{\mathrm{i}}}\right)}^2\right)\cdot \left(\mathrm{n}{\displaystyle \sum_{\mathrm{i}=1}^{\mathrm{n}}{\mathrm{P}}_{\mathrm{i}}^2}{\left({\displaystyle \sum_{\mathrm{i}=1}^{\mathrm{n}}{\mathrm{P}}_{\mathrm{i}}}\right)}^2\right)}} $$
    (19)

    where P i represents the experimental function and O i signifies the forecast values. The amount of test data is denoted by n.

The SVR kernel functions used to predict potato production are RBF, a polynomial function and a linear function. The parameters associated with these kernels are C, e, γ, d and t. The accuracy of the SVM model relies on model parameter selection. The user-defined parameters (C, e, γ, d and t) were selected after several trials using different combinations of polynomial kernels (C and d) and radial basis function kernels (C and t). The optimal user-defined parameter values are summarized in Table 4.

Table 4 User-defined parameters for SVR

Performance Analysis

The expected and actual values for each SVR kernel function and ANFIS were compared using root-mean squared error (RMSE) and the Pearson correlation coefficient. The performance indices for different techniques used to estimate potato production are shown in Table 5. According to this table, ANFIS is the most effective in estimating potato yield.

Table 5 Performance indices of various approaches for potato production estimation

Conclusion

This study revealed that an ANFIS network can be used to model the energy inputs used for potato production in Iran. The Pearson correlation coefficient (r) for ANFIS-predicted potato yield was 0.9999 in the training and testing phases. The SVR model had a correlation coefficient of 0.8484 in training and 0.9984 in testing. The conclusions drawn from the results can be summarized as follows.

  • An analysis of the effect of input parameters on the output revealed that manual labor, chemicals, and machinery have the greatest impact on output.

  • The results indicate that ANFIS is a valuable tool for predicting potato production using certain input energies.

  • The RMSE and Pearson correlation coefficient indicated that the ANFIS predictions were more accurate than the SVR predictions.

  • A sensitivity analysis of the effect of input parameters on output showed that chemical fertilizers and manure from farm animals, diesel, and chemicals have a significant effect on potato production, while electricity, manual labor and transportation have significantly less effect on output.

    The soft computing methods utilized in this study have superior learning and prediction abilities. This study also revealed that the proposed prediction model has the capacity to overcome the lack of artificial neural networks without defining network structure, thus avoiding trapping in the local optimum.