Skip to main content
Food Science & Nutrition logoLink to Food Science & Nutrition
. 2019 Aug 30;7(10):3176–3184. doi: 10.1002/fsn3.1149

Using adaptive neuro‐fuzzy inference system and multiple linear regression to estimate orange taste

Marzieh Mokarram 1,, Hosein Amin 2, Mohammad R Khosravi 3
PMCID: PMC6804764  PMID: 31660131

Abstract

In this research, some characteristic qualities of orange fruits such as vitamin C and acid content; weight; fruit and skin diameter; and red (R), green (G), and blue (B) values of the RGB color model for 70 samples were used to predict the taste of orange grown in Darab, southeast of Fars Province, Iran, by multiple linear regression (MLR) and adaptive neuro‐fuzzy inference system (ANFIS). To use MLR, firstly the most important input data were selected, and then, the best model to predict the taste of orange was applied. In this research, methodology of ANFIS consisted of selection of dependent orange taste, fuzzification, fuzzy inference rule, membership function, and defuzzification process. The predictive capability of these models was evaluated by various descriptive statistical indicators such as mean square error (MSE) and determination coefficient (R 2). The results showed that the prediction performance of the MLR model has a strong significant relationship between orange taste and vitamin C (0.897**), red color (0.901**), and blue color (0.713*). Also, the results of ANFIS model showed that with low error for train and check data increased the most accuracy for prediction of orange taste. Moreover, the results indicated that the success rate of taste determination for orange is higher by using ANFIS compared to the MLR. This research was to provide valuable information for orange taste.

Keywords: adaptive neuro‐fuzzy inference system, Darab, multilayer perceptron, orange taste, vitamin C

1. INTRODUCTION

Artificial neural networks (ANNs) have been used to forecast soil, water, and vegetation characteristics (Ferreira, Callou, Josua, Tutsch, & Maciel, 2019; Liu, Yang, Ge, & Miao, 2006; Rad, Fanaei, & Rad, 2015). The ANN method does not need any specific function to model the relationship between inputs and outputs. However, a training procedure is used in the ANN method to link the input and output data (Schaap & Leij, 1998).

Usually in several years, ANNs because of their nonlinear characteristics have been applied (Yilmaz & Kaynar, 2011). Different efforts have been conducted in relation to modeling different fruit parameters by ANN methods. Simões, Costa, Hirakawa, and Saraiva (2002) used artificial neural network using RGB color systems for orange sorting. Kondo, Ahmad, Monta, and Murase (2000) forecasted the sugar content or pH of orange fruit using ANN.

Scala et al. (2013) used an ANN model for forecasting quality properties of fruits during convective dehydration. Choi, Kwon, Bae, and Kim (2016) used DNN (deep neural network) to predict fruit characteristics. The results showed that the model to perform the detection of seven fruits was suitable.

In order to forecast sugar content and taste of orange, Kondo et al. (2000) used image processing and ANNs. Also, the determination of orange taste using image processing and ANFIS (Fuzzy Inference Systems) was studied by Adelkhani, Beheshti, Minaei, Javadikia, and Ghasemi‐Varnamkhasti (2013). The results showed that the accuracy of model for forecasting orange taste was 93%.

Moreover, the studies showed that using spectral reflectance could predict characteristic fruits. So that, the visible light of the spectrum reflectance to predict characteristics of trees (Valencia orange) such as fruit and leaf was used (Gausman, 2009).

In fact, according to fruit color and pigment content, spectral reflectance can predict the quality of fruits (Li et al., 2018). Fruit color is applied as a qualitative as well as quantitative character distinguishing the fruit quality (Kondo et al., 2007; Sun & Li, 2017; Tarantino, Lops, Disciglio, & Lopriore, 2018; Veerappan et al., 2016; Zheng, An, Feng, & Wang, 2017).

The main aim of this work is to utilize the ANFIS method to predict orange taste. This method is based on Sugeno‐type system for the simulation and analysis of the mapping relationship between the vitamin C, acid, weight, fruit and skin diameter, red (R), green (G), and blue (B) as input data and orange taste as output data through the back‐learning multiplication process.

So the aim of this research is employing the MLR and ANN modeling techniques such as ANFIS to determine the orange taste in Darab, southeast of Fars Province, Iran (Figure 1).

Figure 1.

Figure 1

Flowchart for prediction of orange taste using ANFIS and MLR methods

2. MATERIALS AND METHODS

2.1. Data

In order to predict orange taste, these parameters (acid, fruit weight, vitamin C, fruit diameter, skin diameter, red, green, and blue values of the RGB color) from 70 samples in different months were measured in Darab gardens, Fars Province, Iran. The summaries of them are shown in Table 1. For measurement of vitamin C and acid was used titration method. For weight were applied GF‐3000 model digital scales. Fruit diameter and skin diameter were measured by S‐R 400 model digital coliseum. Finally, by using MATLAB software, orange images were converted to a matrix.

Table 1.

Summaries of input data for prediction of orange taste

Parameters Vitamin C (mg/100) Acid (mg/l) Weight (g) Fruit diameter (mm) Skin diameter (mm) Color
Red Green Blue
Minimum 48.00 0.33 22.70 62.06 2.40 71.50 69.50 8.00
Maximum 163.50 1.04 378.46 87.97 6.91 242.00 171.00 71.00
Average 109.27 0.56 234.54 74.39 4.38 158.11 117.73 24.91
STDEV 22.94 0.17 56.64 5.86 1.15 44.31 24.80 11.86

2.2. Multiple regression models

The general aim of multiple regressions is to determine the relationship between independent (vitamin C, acid, weight, fruit and skin diameter, red [R], green [G], and blue [B]) and dependent (orange taste) parameters for the investigation of designated goal. The regression equations were computed based on Equation 1:

M=S0+S1X1+S2X2++bnXn (1)

where M is the dependent variable, S 0 is the intercept, S 1bn are regression coefficients, and X 1Xn are independent factors referring to basic orange characteristics.

2.3. Adaptive neuro‐fuzzy inference system (ANFIS)

Artificial neural networks are used as modeling tool to determine the best model between input and output variables. ANN models were used by several authors, for example, Alp and Cigizoglu (2007), Azmathullah et al. (2009), Bateni, Borghei, and Jeng (2007), Lee, Jeng, Zhang, and Hong (2007), Vali, Ramesht, and Mokarram (2013) and Mokarram and Bijanzadeh (2016).

The ANFIS is one of the ANN models that is a combination of fuzzy systems and ANN. The stage of ANFIS method is shown in Figure 2.

Figure 2.

Figure 2

General architecture of the fuzzy inference system

To forecast fuzzy rules, for eight inputs, a typical rule set with eight fuzzy rules and eight membership functions (MF) can be expressed as follows (Bui, Bui, Zou, Van Doan, & Revhaug, 2017):

Rule1:Ifx1isT1,x2isT2,x3isT3,x4isT4,x5isT5,x6isT6,x7isT7,x8isT8,thenf1=k1x1+l1x2+m1x3+n1x4+o1x5+p1x6+q1x7+r1x8+r1Rule2:Ifx1isT11,x2isT22,x3isT33,x4isT44,x5isT55,x6isT66,x7isT77,x8isT88,x9isT99,thenf2=k2x1+l2x2+m2x3+n2x4+o2x5+k2x6+l2x7+m2x8+r2 (2)

where x 1, x 2, … xn are inputs; fj (j = 1 n) are output.

For definition, membership function was used as Gaussian function. The Gaussian function is distinguished using the central value m and a standard deviation k more than 0. The membership function is shown in the following:

μAx=e-x-m22k2 (3)

where m and k are arbitrary real constants. The membership function of Gaussian function shows that in Figure 3.

Figure 3.

Figure 3

The membership function

Membership function for eight input data and the rules are shown in the following:

w1=μ1x1+μ1x2+μ1x3+μ1x4+μ1x5+μ1x6+μ1x7+μ1x8+r1w2=μ2x1+μ2x2+μ2x3+μ2x4+μ2x5+μ2x6+μ2x7+μ2x8+r2w3=μ3x1+μ3x2+μ3x3+μ3x4+μ3x5+μ3x6+μ3x7+μ3x8+r3 (4)

The j‐th node of this layer computes the normalized firing strengths as (N):

W¯j=wji=18wjj=1÷8W¯jfj=w¯kjx1+ljx2+mjx3+njx4+ojx5+pjx6+qjx7+rjx8j=1÷8 (5)

The normalized firing strength (N) is computed in j‐th node of this layer. Moreover, the overall output (µ) obtained by ANFIS method is calculated in this layer.

Q=i=18w¯ifi=f (6)

In total, ANNs consist of computing the outputs, compare the outputs with the desired target values, adjust the weights, and repeat the process.

One of the most widely used algorithms in the field of orange taste properties is the basic backpropagation, FCM, and hybrid algorithms. These algorithms minimize the difference between obtained outputs and desired targets by calculating some factors such as MSE, RMSE, and MAE factors.

2.3.1. Network design

The ANFIS used in the study contains an eight‐layer feedforward neural network and implements TS (Takagi Sugeno) fuzzy inference system for a systematic method to making fuzzy rules from a given input–output dataset. The RMSE (root mean square error), MAE (mean absolute error), and correlation coefficient (R) were computed to provide an indication of goodness of fit between the observed and forecasted values.

2.4. Performance evaluation criteria

For determination of the precision of the forecasting capacity of the models, mean square error (MSE) and the coefficient (R 2) were used that can be calculated using Equations 7 and 8:

R2=1-i=1Nyi-y^ii=1Nyi-y¯i2 (7)
MSE=1Ti=1Nyi-y^i2 (8)

In Equations 7 and 8, T depicts the number of data, yi is the desired output, and y^i is the predicted output.

3. RESULTS AND DISCUSSION

3.1. Orange analysis

In order to predict orange taste, 70 samples in different months were used (Figure 4). In addition, 70% of the whole data were used for training procedure, while it is 30% to test the obtained results (Tables 2 and 3).

Figure 4.

Figure 4

The samples orange in different months. (a): Early November; (b): Late November; (c): Early January; (d): Late January; (e): Middle February; (f): Middle March

Table 2.

Descriptive statistics of the training dataset

Parameters Vitamin C (mg/100 ml) Acid (mg.m/L) Weight (g) Fruit diameter (mm) Skin diameter (mm) Color
Red Green Blue
Minimum 39 0.27 22.7 62.56 2.46 68 71 8
Maximum 153 0.88 378.46 87.97 6.81 242 170 91
Average 107.488 0.5304 239.816 74.1804 4.1474 148.96 119.82 25.38
STDEV 23.03 0.14 55.41 5.71 1.15 47.29 24.08 13.37

Table 3.

Descriptive statistics of the testing dataset

Parameters Vitamin C (mg.100 m/L) Acid (mg.m/L) Weight (g) Fruit diameter (mm) Skin diameter (mm) Color
Red Green Blue
Minimum 57 0.38 22.7 61.56 2.34 75 68 8
Maximum 174 1.19 378.46 87.97 7 242 172 51
Average 111.06 0.59 229.25 74.59 4.61 167.26 115.64 24.44
STDEV 22.83 0.19 57.87 5.99 1.13 41.32 25.52 10.34

3.1.1. Relationships between orange variables

The calculated R between orange taste and independent variables was investigated by means of SPSS V.22 software that are shown in Table 4. It was found that there was a positive and highly significant correlation between taste and vitamin C (0.897**), red color (0.901**), and blue color (0.713*) content.

Table 4.

Simple linear coefficient correlations (r) among orange variables

Parameters Taste Vitamin C (mg.100 m/L) Acid (mg.100 m/L) Weight (g) Fruit diameter (mm) Skin diameter (mm) Color
Red Green Blue
Taste 1 0.897* 0.001 −0.234 −0.319 0.256 0.901* −0.183 0.713**
Vitamin C (mg.100 m/L) 0.897* 1 −0.074 −0.198 −0.349 −0.084 0.848* −0.378 0.424
Acid (mg.100 m/L) 0.001 −0.074 1 −0.090 −0.043 0.216 −0.045 −0.249 −0.347
Weight (g) −0.234 −0.198 −0.090 1 0.979* 0.169 −0.072 −0.050 −0.075
Fruit diameter (mm) −0.319 −0.349 −0.043 0.979* 1 0.244 −0.178 0.073 −0.065
Skin diameter (mm) 0.256 −0.084 0.216 0.169 0.244 1 0.066 0.420 0.376
Red 0.901* 0.848* −0.045 −0.072 −0.178 0.066 1 −0.419 0.705**
Green −0.183 −0.378 −0.249 −0.050 0.073 0.420 −0.419 1 0.103
Blue 0.713** 0.424 −0.347 −0.075 −0.065 0.376 0.705** 0.103 1
*

Correlation is significant at the .01 level (2‐tailed).

**

Correlation is significant at the .05 level (2‐tailed).

3.2. Prediction of orange taste by using MLR

For predicting orange taste by the MLR model, the first most important input data were selected using the stepwise method, and then, linear interaction term of these basic orange characteristics was defined in the SPSS V.22 software. The results based on R 2 showed that model 1 with red color parameter was the best model for prediction of orange taste (Tables 5 and 6).

Table 5.

MLR model summary for orange taste prediction

Model R R 2 Adjusted R 2 SE of the estimate Change statistics
R 2 change F change df1 df2 Sig. F change
1 .901a .811 .784 0.9847 .811 30.117 1 7 0.001
a

Predictors: (Constant), Red.

Table 6.

Performance indices (R, R 2, and MSE) and coefficients of variables for different MLR models for prediction of orange taste

aModel Unstandardized coefficients Standardized coefficients t Sig. Correlations Collinearity statistics
B SE β Zero‐order Partial Part Tolerance VIF
1 (Constant) −25.989 7.515   −3.458 0.011          
R .211 .038 .901 5.488 .001 .901 .901 .901 1.000 1.000
a

Dependent variable: taste.

As it is obvious from Table 5, the R 2 value was .901 that proves the performance of the MLR method. In addition, Figure 5 shows the relationship between “taste” and “vitamin C” factors as a scatter plot in MLR method.

Figure 5.

Figure 5

The scatter plot of the measured versus predicted orange taste using MLR

3.3. Prediction of orange taste using ANFIS

The adaptive neuro‐fuzzy inference system (ANFIS) has been made using Fuzzy Logic Toolbox graphical user interface (GUI) tools in MATLAB R2014a. Input data for prediction of orange taste were vitamin C, acid, weight, fruit diameter, skin diameter, red, green, and blue wave. The Surface Viewer was used for presenting the mapping from nine inputs to one output for prediction of orange taste (Figure 6).

Figure 6.

Figure 6

Relationship between one of the inputs and orange taste

The Rule Viewer presents a sort of micro view of the fuzzy inference system as shown in Figure 7. Nine input values were selected by feature section algorithm.

Figure 7.

Figure 7

Inference system design

3.4. Validation of the results

ROC‐AUC analysis was used to evaluate the accuracy of the results. The 15 oranges and the associated values for the contributing factors were used for verification. The ROC curve showed that ANFIS and MLR had AUC values of 0.919 and 0.828. It demonstrates that ANFIS produced excellent to very good results (Figure 8 and Table 7).

Figure 8.

Figure 8

Success rate curves for the orange taste using MLR and ANFIS methods

Table 7.

Area under the curve of built models

Models Area SE Asymptotic significant Asymptotic 95% confidence interval
Lower bound Upper bound
MLR 0.828 0.087 0.002 0.697 0.920
ANFIS 0.919 0.067 0.001 0.797 0.980

Also, in order to determine accuracy of modeling of orange taste, using ANFIS model were train and check data the output of modeling by ANFIS model and target value. The results showed that the model with low error for train and check data respectively had most accuracy for prediction of orange taste (Figure 9).

Figure 9.

Figure 9

Accuracy of check and train data for prediction of orange taste

The input data and output data were fed into the ANFIS model to extract the rules. In fact, the ANFIS method is suitable where there is not enough information or extraction of rules is hard. Similarly Adelkhani et al, (2013)used ANFIS model to predict fruit quality. The results of them showed that the ANFIS method was suitable to predict fruit quality.

4. CONCLUSION

In this research, an attempt was made to predict the taste of orange in Fars Province, Iran, based on the MLR and ANFIS. This research developed a fuzzy logic model using the Sugeno fuzzy inference system. In the model to predict orange taste, vitamin C, acid, weight, fruit diameter, skin diameter, red, green, and blue values were used as input data. The rules were determined using ANFIS model in MATLAB software automatically. The ANFIS model according to train data and considering the lowest error defines rules. Moreover, the results show that the model with low error for train and check data respectively had most accuracy for prediction of orange taste. The advantage of this model compared to the other models was definition membership function according to train data automatically. In fact, definition membership function using ANFIS model and due to the reduction expert opinion causes the error probability to be zero.

CONFLICT OF INTEREST

The authors declare that they have no competing interests.

ETHICAL APPROVAL

Not applicable.

CONSENT FOR PUBLICATION

Not applicable.

INFORMED CONSENT

Written informed consent was obtained from all study participants.

ACKNOWLEDGMENT

The authors would like to thank Shiraz University for providing financial support (238726‐121) for this study.

Mokarram M, Amin H, Khosravi MR. Using adaptive neuro‐fuzzy inference system and multiple linear regression to estimate orange taste. Food Sci Nutr. 2019;7:3176–3184. 10.1002/fsn3.1149

DATA AVAILABILITY STATEMENT

The datasets used and analyzed during the current study are available from the corresponding author on reasonable request.

REFERENCES

  1. Adelkhani, A. , Beheshti, B. , Minaei, S. , Javadikia, P. , & Ghasemi‐Varnamkhasti, M. (2013). Taste characterization of orange using image processing combined with ANFIS. Measurement, 46(9), 3573–3580. 10.1016/j.measurement.2013.06.052 [DOI] [Google Scholar]
  2. Alp, M. , & Cigizoglu, H. K. (2007). Suspended sediment load simulation by two artificial neural network methods using hydrometeorological data. Environmental Modelling & Software, 22, 2–13. 10.1016/j.envsoft.2005.09.009 [DOI] [Google Scholar]
  3. Azmathullah, H. M. , Chang, C. K. , Ghani, A. A. , Ariffin, J. , Zakaria, N. A. , & Hasan, Z. A. (2009). An ANFIS‐based approach for predicting the bed load for moderately sized rivers. Journal of Hydro‐Environment Research, 3, 35–44. 10.1016/j.jher.2008.10.003 [DOI] [Google Scholar]
  4. Bateni, S. M. , Borghei, S. M. , & Jeng, D. S. (2007). Neural network and neuro‐fuzzy assessment for scour depth around bridge piers. Engineering Applications of Artificial Intelligence, 20, 401–414. [Google Scholar]
  5. Bui, K. T. T. , Bui, D. T. , Zou, J. , Van Doan, C. , & Revhaug, I. (2017). A novel hybrid artificial intelligent approach based on neural fuzzy inference model and particle swarm optimization for horizontal displacement modeling of hydropower dam. Neural Computing and Applications, 29, 1495–1506. 10.1007/s00521-016-2666-0 [DOI] [Google Scholar]
  6. Choi, I. , Kwon, K. , Bae, S. H. , & Kim, N. S. (2016). DNN-based sound event detection with exemplarbased approach for noise reduction. In Proceedings of the Detection and Classification of Acoustic Scenes and Events 2016 Workshop (DCASE2016) (pp. 16–19).
  7. Ferreira, J. , Callou, G. , Josua, A. , Tutsch, D. , & Maciel, P. (2019). An artificial neural network approach to forecast the environmental impact of data centers. Information, 10(3), 113 10.3390/info10030113 [DOI] [Google Scholar]
  8. Gausman, H. W. (2009). Leaf reflectance of near‐infrared. Photogrammetric Engineering and Remote Sensing, 1974(40), 183–191. [Google Scholar]
  9. Kondo, N. , Ahmad, U. , Monta, M. , & Murase, H. (2000). Machine vision based quality evaluation of Iyokan orange fruit using neural networks. Computers and Electronics in Agriculture, 29, 135–147. 10.1016/S0168-1699(00)00141-1 [DOI] [Google Scholar]
  10. Kondo, N. , Ninomiya, K. , Kamata, J. , Chong, V. K. , Monta, M. , & Ting, K. C. (2007). Eggplant grading system including rotary tray assisted machine vision whole fruit inspection. Journal of the Japanese Society of Agricultural Machinery, 69(1), 68–77. [Google Scholar]
  11. Lee, T. L. , Jeng, D. S. , Zhang, G. H. , & Hong, J. H. (2007). Neural network modeling for estimation of scour depth around bridge piers. Journal of Hydrodynamics, Ser. B, 19(3), 378–386. [Google Scholar]
  12. Li, F. , Song, X. , Wu, L. , Chen, H. , Liang, Y. , & Zhang, Y. (2018). Heredities on fruit color and pigment content between green and purple fruits in tomato. Scientia Horticulturae, 235, 391–396. 10.1016/j.scienta.2018.03.030 [DOI] [Google Scholar]
  13. Liu, G. , Yang, X. , Ge, Y. , & Miao, Y. (2006). An artificial neural network‐based expert system for fruit tree disease and insect pest diagnosis. In 2006 IEEE International Conference on Networking, Sensing and Control (pp. 1076–1079). IEEE. [Google Scholar]
  14. Mokarram, M. , & Bijanzadeh, E. (2016). Prediction of biological and grain yield of barley using multiple regression and artificial neural network models. Australian Journal of Crop Science, 10(6), 895. [Google Scholar]
  15. Rad, M. R. N. , Fanaei, H. R. , & Rad, M. R. P. (2015). Application of Artificial Neural Networks to predict the final fruit weight and random forest to select important variables in native population of melon (Cucumis melo L.). Scientia Horticulturae, 181, 108–112. [Google Scholar]
  16. Scala, K. D. , Meschino, G. , Vega‐Galvez, A. , Lemus‐Mondaca, R. , Roura, S. , & Mascheroni, R. (2013). An artificial neural network model for prediction of quality characteristics of apples during convective dehydration. Journal of Food Science and Technology, 33(3), 411–416. [Google Scholar]
  17. Schaap, M. G. , & Leij, F. J. (1998). Using neural networks to predict soil water retention and soil hydraulic conductivity. Soil & Tillage Research, 47, 37–42. [Google Scholar]
  18. Simões, A. S. , Costa, A. H. R. , Hirakawa, A. R. , & Saraiva, A. M. (2002). Applying neural networks to automated visual fruit sorting. Proc. of the World Congress of Computers in Agriculture and Natural Resources, Iguazu Falls, Brazil, pp. 1–7. [Google Scholar]
  19. Sun, Y. , & Li, W. (2017). Effects the mechanism of micro‐vacuum storage on broccoli chlorophyll degradation and builds prediction model of chlorophyll content based on the color parameter changes. Scientia Horticulturae, 224, 206–214. 10.1016/j.scienta.2017.06.040 [DOI] [Google Scholar]
  20. Tarantino, A. , Lops, F. , Disciglio, G. , & Lopriore, G. (2018). Effects of plant biostimulants on fruit set, growth, yield and fruit quality attributes of ‘Orange rubis’ apricot (Prunus armeniaca L.) cultivar in two consecutive years. Scientia Horticulturae, 239, 26–34. [Google Scholar]
  21. Vali, A. A. , Ramesht, M. H. , & Mokarram, M. (2013). The comparison of RBF and MLP neural networks performance for the estimation of land suitability. Journal of Environmental Management, 2(3), 74–78. [Google Scholar]
  22. Veerappan, K. , Jung, H. J. , Hwang, I. , Kho, K. H. , Chung, M. Y. , & Nou, I. S. (2016). Sequence variation in SlMYB12 is associated with fruit peel color in pink tomato cultivars. Horticulture, Environment, and Biotechnology, 57(3), 274–279. [Google Scholar]
  23. Yilmaz, I. , & Kaynar, O. (2011). Multiple regression, ANN (RBF, MLP) and ANFIS models for prediction of swell potential of clayey soils. Expert Systems with Applications, 38, 5958–5966. [Google Scholar]
  24. Zheng, J. , An, Y. Y. , Feng, X. X. , & Wang, L. J. (2017). Rhizospheric application with 5‐aminolevulinic acid improves coloration and quality in ‘Fuji’ apples. Scientia Horticulturae, 224, 74–83. 10.1016/j.scienta.2017.06.004 [DOI] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

The datasets used and analyzed during the current study are available from the corresponding author on reasonable request.


Articles from Food Science & Nutrition are provided here courtesy of Wiley

RESOURCES