Estimation of the Constituent Properties of Red Delicious Apples Using a Hybrid of Artificial Neural Networks and Artificial Bee Colony Algorithm

: Non ‐ destructive estimation of the constituent properties of fruits and vegetables has led to a dramatic change in the agriculture and food industry, allowing accurate and efficient sorting of the products based on their internal properties. Therefore, the present study utilized visible (VIS) and near ‐ infrared (NIR) spectroscopy data in the range from 200 to 1100 nm for the estimation of several properties of Red Delicious apples, namely Brix minus acid (BrimA), firmness, acidity and starch content, using a hybrid of Artificial Neural Networks and Artificial Bee Colony (ANN–ABC) algorithm. Furthermore, the hybrid Artificial Neural Network–Particle Swarm Optimization (ANN–PSO) algorithm was utilized to select the most effective properties to estimate these characteristics. The results indicated that there are different peaks within this spectral range, and the spectral range for each peak gives different results. To ensure the stability of the proposed method, 1000 replications were performed for each estimate. The highest coefficients of determination, R 2 , for estimating the studied properties among the 1000 replicates were 0.898 for BrimA, 0.8 for firmness, 0.825 for acidity and 0.973 for starch content. The selection of the most effective wavelengths for estimating the properties produced five effective wavelengths for BrimA, nine for firmness, seven for acidity and five for starch content. In this case, the best R 2 of the hybrid ANN–ABC among the 1000 iterations were 0.828, 0.738, 0.9 and 0.923, respectively.


Introduction
The importance of fruit sorting and grading is increasing in the agro-industry and global economy. The classification of fruits based on their internal and external qualitative features enables intelligent management at the different stages of fruit distribution and processing [1]. The appearance, color, size and absence of defects on fruits are some of the most important qualitative characteristics based on external fruit properties [2]. On the other hand, the most important internal or constituent properties, which attract buyers, include Soluble Solids Content (SSC), Titratable Acidity (TA) and the ratio of Soluble Solids Content to Titratable Acidity [3][4][5][6].
Conventional methods for measuring internal properties of fruits are a kind of destructive method, since the fruits are destroyed in the process. In the last decade, however, non-destructive methods have received more interest due to permitting individual measurement and analysis of fruits, reducing waste and allowing repeated measurements at the same conditions for different times [7]. Some of these non-destructive methods include near-infrared spectroscopy (NIRS) [7][8][9][10][11], midinfrared spectroscopy (MIRS) [10,12], hyperspectral imaging (HSI) [10,13], ultraviolet-visible spectroscopy (UV-vis) [14], Raman spectroscopy [10] and the Proton Transfer Reaction Mass spectrometry (PTR-MS) [15,16]. Among these non-destructive methods, NIRS is the most widely used for quality control in food and agricultural industries [7,17].
For example, in the work by Moscetti et al. [18], hailstorm damage was detected on olive using NIRS. For this purpose, 744 olives were used and the spectrums in the range from 1100 to 2300 nm were obtained with a Luminar 5030 Acousto-Optic Tunable Filter Near-Infrared (AOTF-NIR) Miniature "Hand-held" Analyzer (Brimrose Corp., Baltimore, MD, USA). A genetic algorithm was used for selecting the input properties for three classifiers: Linear Discriminant Analysis (LDA), Quadratic Discriminant Analysis (QDA) and k-nearest neighbor (KNN). The wavelengths selected by the genetic algorithm were 1320, 1460, 1650, 1920, 2080, 2200 and 2220 nm. The determination of the fruit ripening degree is another application of the spectroscopy method. In this regard, Neto et al. [19] conducted a study to determine the ripening stage of mango fruits using electrical impedance spectroscopy. This technique is based on changes in the bulk resistance depending on fruit ripening due to the changes in the fluid content of fruit fibers. The results indicated a strong correlation between mechanical measurements and electrical parameters. Therefore, it is possible to measure the degree of fruit ripening using this non-destructive method.
Another interesting application is the non-destructive estimation of the constituent properties of the fruits. Bizzani et al. [20] developed a method to estimate the firmness, skin thickness and total pectin content. They used Partial Least Square Regression (PLSR) models of data of Time Domain Nuclear Magnetic Resonance (TD-NMR) spectroscopy, NIRS and MIRS to predict these properties in fresh Valencia oranges. The results indicated that NIRS and MIRS produced the best PLSR models for predicting orange firmness, with Pearson Correlation Coefficients (PCC) of 0.92 and 0.84, respectively. The PLSR model relating to the TD-NMR for predicting the orange peel thickness achieved a PCC of only 0.72. Finally, the total pectin content was predicted using TD-NMR and NIRS with PCC of 0.76 and 0.70, respectively. In another research, Xie et al. [21] performed the nondestructive estimation of the amounts of titratable acidity, malic acid and citric acid in bayberry using NIRS. For this, 129 samples of bayberry juice were prepared from 14 different cultivars, and nine different regions in China. The studied spectral range was 400 to 1250 nm. The results indicated that the correlation coefficient, R, was 0.896, 0.669 and 0.897 for the prediction of the best model for the titratable acidity, malic acid and citric acid, respectively. Therefore, these fruit analysis methods based on spectroscopy are gaining interest in the research community around the world because they are fast, non-destructive and can be widely used in sorting based on the internal properties of the fruits. Some aspects that are important to consider are the procedure for applying these methods, and the accuracy of the predicted values using robust estimation methods. Consequently, the present study used a hybrid technique based on Artificial Neural Networks and the Artificial Bee Colony (ANN-ABC) algorithm for the non-destructive estimation of some constituent properties of the fruits. These properties include Brix minus acid (BrimA), firmness, acidity and starch content of Red Delicious apples in the VIS-NIR spectrum. Furthermore, the most effective wavelengths of the spectrum were selected using a hybrid of Artificial Neural Networks and the Particle Swarm Optimization (ANN-PSO) algorithm. Then, the selected wavelengths were used as the input to the hybrid ANN-ABC algorithm to estimate the same constituent properties.

Sampling and Collection
Since the most important purpose of the present study was the non-destructive estimation of different constituent properties of Red Delicious apples, the most adequate harvest days were asked to different gardeners of Kermanshah, Iran (34°18′48.87″ N, 47°4′6.92″ E). After determining these harvest dates, four stages were planned for the data collection. In each stage, 16 trees were randomly selected for harvesting. The first stage was 135 days after flowering, and 55 apple samples were harvested at this stage. The second stage was 145 days after flowering, and 53 apple samples were harvested. The third stage was 155 days after flowering, and 56 samples were obtained. Finally, the fourth stage was 165 days after flowering, with 55 samples. During the harvest process, apples with a healthy appearance and medium size were collected, giving an average size in length of 57.47 mm (3.07 mm standard deviation), width 63.01 mm (3.67 mm standard deviation) and height 62.61 mm (3.53 mm standard deviation). The color at the first stage was almost green, and at the fourth stage was mostly red. At each stage after harvesting, the samples were transferred to Shahid Beheshti University for spectral data extraction, and then their mechanical and physicochemical properties were extracted in Karaj Agricultural Engineering Research Institute. The resulting dataset was divided into training and test sets.

Extracted Spectral Data
The radiation of electromagnetic waves to a material absorbs and reflects certain wavelengths according to the properties of the material. This interaction between radiation and material provides information in spectroscopic studies. In fruits and vegetables, the radiation absorption process is mostly due to C-H, O-H and N-H bonds [7]. Figure 1 shows the configuration of the spectroscopy system used in the present research. The spectrometer used in this research was an EPP200NIR model (StellarNet Inc., Tampa, FL, USA) with an indium-gallium-arsenide detector. It has a working range from 200 to 1100 nm and a resolution between 0.1 and 0.4 nm. The reflective mode was the measurement mode used in the study. The spectrometer was connected by a USB2 cable to a laptop PC, equipped with SpectraWiz ® software (StellarNet Inc., Tampa, FL, USA) to save the resulting spectra on the computer. The light source was an SLI-CAL model (StellarNet Inc., Tampa, FL, USA) made of 20 W tungsten halogen. A two-strand optical fiber was used to direct the light beam from the light source to the apple and from the apple to the spectrometer. Four random points on each apple were used for the analysis, and the average of their spectral data was considered in the study. The exact location of the optical fiber is not important, because the radiation penetrates the apples. The wavelengths from 200 to 400 nm and from 1000 to 1100 nm were eliminated due to the high noise that was observed in these bands; hence, the examined spectral range was 400 nm to 1000 nm. Due to the noise produced by the spectrometer, we eliminated 13 samples from the 55 samples of the first stage, 8 samples from the 53 samples of the second stage, 5 samples from the 56 samples of the third stage and 6 samples from the 55 samples of the fourth stage. Therefore, the number of samples from the first to fourth stages for the analysis were 42, 45, 51 and 49, respectively.

Reflection and Absorption Spectra
According to Nicolaï et al. [7], the reflection spectra of different fruits such as apples, oranges, nectarines and pears are similar. This means that the occurrence of spectral peaks is similar in the charts of these fruits. As an example, Figure 2 shows the mean reflection spectrum of VIS-NIR light for the 187 apple samples considered, computed using the ParLeS software (IM Publications LLP, Chichester, UK). This software is also able to convert the reflection spectra, R, to the absorption spectra by taking log(1/R) to reduce the nonlinearity that may exist in the data [22]. Figure 3 shows the mean absorption spectrum of VIS-NIR light for the 187 apple spectra considered. It can be observed that there are different peaks in this spectral range. The peak at 490 nm is attributed to carotenoid absorption; the peaks at 549 and 680 nm are related to chlorophyll A absorption [23,24]; the peaks for 849 and 875 nm are due to the N-H bond; and finally, the peak corresponding to 962 nm wavelength belongs to O-H and C-H bonds [25].

Measurement of the BrimA Property
BrimA is an abbreviation of Brix minus acids. It was introduced by Jordan et al. [26], as a parameter that is highly related to the sweetness and flavor of the fruits. Using it, sweetness and flavor of the fruits have been estimated by different authors [27]. This parameter is based on Total Soluble Solids (TSS) and Titratable Acidity (TA). TSS is measured as a percentage that indicates the content of soluble sugars with a contribution from the fruit's acids, and TA is generally expressed as a percentage of the predominant acid. Specifically, this index is calculated using the following equation: where K is a constant coefficient equal to 5 [28].

Measurement of the Firmness
Apple firmness was measured using a hand-pushed penetrometer. Therefore, a special apple probe was used, consisting of a cylindrical rod attached to the machine, with 11 mm of diameter and 8 mm of height to the marker, for dipping into the apples.
According to the standard recommended procedure [29], the penetrometer was first calibrated, and then each apple was tested on two opposite sides without fruit peel. The mean of these two measurements was stored as the firmness. The numbers were calculated and recorded in terms of force in Newton (N). During the test, it was tried to ensure that the applied force rate was equal in all the samples [29]. For this purpose, the penetrometer was first calibrated and then a part of the fruit peel was removed with a peeler. The tip of the penetrometer was put into the peeled place, and the cylindrical probe was gently dipped into the tissue at a balanced speed. Finally, the amount of applied pressure in N was read from the machine by hand.

Measurement of the Acidity
The acidity of the apple juice was measured using a pH meter of model 8689 AZ Detachable pH Pen (AZ Instrument Corp., Taichung, Taiwan). To obtain the juice, first, the middle part of each apple was peeled to remove the seeds. Then, a slice of the apple was cut and crushed in a mortar, and the juice was extracted from it using a strainer.

Measurement of the Starch Content
Starch is a complex carbohydrate that contains many glucose units linked by a glycosidic bond. To measure starch content in an apple, some juice was extracted as explained in the previous subsection. Then, this juice was dissolved in a mixture of dimethyl sulfoxide and hydrochloric acid. The ratio of dimethyl sulfoxide to hydrochloric acid was 4 to 1. After that, it was centrifuged at 12,000 rpm for 15 min. To prepare the iodine reagent, hydrochloric acid, 0.06 g of potassium iodide and 0.003 g of iodine were dissolved in 100 mL of 0.05 N hydrochloric acid. A mixture of 0.5 mL of iodine reagent (yellow reagent) and 0.5 mL of juice were poured into a small plastic tube and thoroughly mixed. After 15 min, the absorption was read at 600 nm using a spectrophotometer Optizen 2120 UV plus (Mecasys Co. Ltd., Daejeon, Korea). The results were presented in mg/g of fresh weight. Standard glucose solutions were prepared in the next step [30]. Different glucose concentrations from 0 to 100 mg/L were used to prepare these solutions. Then, a scatter plot was drawn relating to the given concentrations and the corresponding absorption values at 600 nm. A linear curve was fit to this scatter plot, obtaining an equation to convert each absorption value into the starch content in mg/L. Finally, starch content in the apples was determined using this equation and the corresponding absorption values. To facilitate its reading, in the experiments, this value is expressed as a percentage of the total weight.

Hybrid Artificial Neural Networks-Particle Swarm Optimization (ANN-PSO) Algorithm
The hybrid technique of Artificial Neural Networks and Particle Swarm Optimization algorithm (ANN-PSO) was used to select the most effective spectral wavelengths for estimating the predefined constituent properties. PSO is a meta-heuristic algorithm that emulates the mass movements of birds to solve different optimization problems. This algorithm was first proposed by Kennedy and Eberhart [31]. Each possible answer to the problem is considered as a particle. All particles are constantly searching and moving. The motion of each particle depends on three factors: (1) the current position of the particle; (2) the best position that this particle has ever had; and (3) the best position that the whole set of particles have ever had [31]. In our case, the whole extracted wavelengths were first considered as a vector. In the next step, other vectors with different sizes were selected and sent to the ANN using the PSO algorithm.
The multilayer perceptron ANN divides the dataset into three disjoint categories: the first category contains 70% of the samples for training; the second category contains 15% for validation; and the third category contains the remaining 15% for testing. The ANN produces a Mean Square Error (MSE) for each selection of wavelengths, in the estimation of each constituent property. Finally, this MSE of each vector is sent to the PSO optimization algorithm. The vector that produces the least MSE is selected as the set of most effective wavelengths. Table 1 presents the hyperparameters of the ANN applied to select the most effective wavelengths with the PSO algorithm. The transfer functions, the backpropagation network training functions and the weight/bias-backpropagation learning functions were selected from the Neural Network Toolbox of the MATLAB software (MathWorks, Natick, MA, USA). The designed network has two hidden layers. The hyperbolic tangent sigmoid (tansig) is used as the activation function for the hidden layers, the scaled conjugate gradient backpropagation (trainscg) is used to train the network and the Hebb weight learning function (learnhd) is used to adapt the network.

Hybrid Artificial Neural Networks-Artificial Bee Colony (ANN-ABC) Algorithm
The hybrid method of Artificial Neural Networks and Artificial Bee Colony algorithm (ANN-ABC) was used to estimate the defined set of constituent properties. The ABC algorithm is inspired by how bees behave in nature. In a beehive, a number of bees are responsible for searching food sources; in the optimization problem, this would mean producing initial responses. After identifying food sources, the bees return to the hive and inform other bees that are called worker bees. Worker bees are sent to these regions to check the amount and quality of the food, and then they return to the hive. This will continue until a food source is identified in large quantities and quality. In the optimization problem, this operation means finding optimal points [32].
The task of the ABC algorithm is to determine the optimal values of the ANN parameters. This network has 5 adjustable parameters: number of layers; number of neurons per layer; transfer function of each layer; backpropagation network training function; and weight/bias-backpropagation learning function. If these parameters have optimal values, the neural network will achieve the highest efficiency.
In the present study, the number of neurons per layer could be at least 0 and at most 25; and the number of layers could be between 1 and 3. The transfer functions, the backpropagation network training functions and the weight/bias-backpropagation learning functions were again selected from MATLAB Neural Network Toolbox. To this end, the ABC algorithm first considers a vector with the same size as the number of the listed parameters, with between 4 and 8 members. Each member represents a parameter. For instance, the vector x = {8, 21, hardlim, poslin, trainbfg, learngd} indicates that the corresponding ANN has 2 hidden layers with 8 and 21 neurons. The hard-limit (hardlim) transfer function is used in the first layer, and the positive linear (poslin) transfer function is used in the second layer. The BFGS quasi-Newton (trainbfg) function is used to train the network, and the gradient descent (learngd) weight/bias-backpropagation learning function is used to adapt the network.
The result of each vector transferred to the ANN is measured with the MSE. Finally, the vector with the least MSE is used as the optimal vector of parameters of the multilayer perceptron ANN. Since different ANN were used in the present research to estimate each constituent property, only a sample table of optimal parameters is presented. Table 2 presents these optimal parameters for estimating BrimA property. This network has 3 hidden layers, with 25 neurons in each layer. The hyperbolic tangent sigmoid (tansig) is used as the activation function of the hidden layers, the Levenberg-Marquardt backpropagation algorithm (trainlm) is used to train the network, and the LVQ1 weight learning function (learnlv1) is used to adapt the network. Table 2. Optimal values of the multilayer perceptron ANN parameters found by the Artificial Bee Colony (ABC) algorithm for the estimation of the Brix minus acid (BrimA) property.

Predictive Model Evaluation Parameters
The parameters used to evaluate the accuracy of the models for the estimation of the constituent properties using the hybrid ANN-ABC were the Mean Square Error (MSE), the Root Mean Square Error (RMSE), the Mean Absolute Error (MAE) and the coefficient of determination R 2 [33,34]. The formulas to calculate these parameters are as follows: where n is the number of samples in the test set, Xs is the measured value of the property for the sample s, Ys is the estimated value of the property for sample s and Xm is the mean of the measured values of the property. Some research works also report the regression coefficient, R, which is simply computed as the square root of R 2 .
On the other hand, given a certain accuracy measure (MSE, RMSE, MAE or R 2 ), since the experiment is repeated many times, it is interesting to report not only the mean value obtained, but also the standard deviation (SD) of this measure. This value indicates the stability of the method in different executions, being the ideal situation an SD near 0. Let us suppose an accuracy measure M, which is repeated m times, producing values Mj for j = 1, …, m. The SD of this measure is defined as: where is the average of the values of Mj.

Estimation of the Constituent Properties Using Spectral Information
As presented in Figure 3, a total of six peak wavelengths were used between 400 and 1000 nm to estimate the constituent properties of Red Delicious apples. In this section, the results for estimating the predefined mechanical and physicochemical properties of the apples related to these peaks in the test data are presented.

Estimation of BrimA
In the estimation of the properties, the hybrid approach ANN-ABC was repeated 1000 times for the estimation of BrimA property, in this case using spectral data around the wavelength 962 nm. Table 3 presents the obtained results in terms of the accuracy evaluation parameters. The standard deviation of the performance evaluation parameters is acceptable because their values are small, compared to the typical values of this property. Figure 4 shows the regression analysis of the scatter plot between the estimated and the measured values of BrimA of the apples, using a spectral data range around the wavelength of 962 nm in the best training execution. As shown in this figure, the regression coefficient R was 0.948 (coefficient of determination R 2 0.898) for the best execution of the hybrid ANN-ABC method, which can be considered an acceptable value for the nondestructive estimation, although the mean R 2 is only 0.7775. Figure 5 shows the boxplots of the five performance criteria for the 1000 iterations. This figure shows that boxplots are highly compressed and the amount of outlier data out of the box is very small. Figure 6 shows the actual value versus the mean estimated value of BrimA property (for the test set), i.e., the mean estimation for each sample after the 1000 iterations. As shown, the mean value set was able to estimate very accurately the actual measured values of the samples.

Estimation of the Firmness
The estimation of the firmness property using the hybrid ANN-ABC approach was also repeated 1000 times. In this case, spectral data around the wavelength of 875 nm was used. Table 4 presents the mean and SD values of the accuracy evaluation parameters. According to this table, the performance of the hybrid ANN-ABC method is unacceptable in the estimation of firmness using these spectral data, since the R 2 is relatively low. Figure 7 shows the regression analysis of the scatter plot between the estimated and the actual (measured) value of firmness of the apples for the best training execution. Figure 8 shows the boxplots of the performance criteria of estimation error and regression coefficients for the 1000 repetitions.  Figure 7 shows that, in the best training execution, this method is able to estimate the firmness with a coefficient of determination greater than 0.8. Figure 8 also indicates that more than half of the replicates are able to estimate the firmness with a coefficient of determination greater than 0.7, although there are some executions with a very poor result. Finally, Figure 9 shows that the mean value of the firmness property for some apple samples is very close to the measured values, but there are some samples that produce a very high error.  Table 5 presents the mean and standard deviation of the accuracy measured in the estimation of acidity on the spectral range around 849 nm at 1000 iterations using the hybrid ANN-ABC method.   Figure 10 contains the regression analysis of the scatter plot between the estimated and the measured value of acidity in the best training case. Figure 11 shows the boxplots of the accuracy criteria for the 1000 repetitions.   Figure 10 indicate that the coefficients of determination for both the mean of the 1000 iterations and the best training execution are greater than 0.8, which can be acceptable for the non-destructive estimation. Figure 11 shows that the boxplots of all performance evaluation parameters of the hybrid ANN-ABC method are compact; hence, it can be argued that this method has close results in different iterations. Figure 12, which depicts the mean of the estimations, also shows that this method is able to achieve an accurate estimate of the acidity.

Estimation of the Starch Content
The experimental results for the estimation of the starch content of the apples are presented in Table 6 and Figures 13-15. In this case, the wavelength of 849 nm was used, and again the test was repeated 1000 iterations. As shown, the mean R 2 is greater than 0.94 for this method, and the R 2 in the best execution is greater than 0.97. In other words, the non-destructive starch estimation is very close to the measured values.

Estimation of BrimA Property
In this set of experiments, the estimation of the constituent properties of the apples is performed using only the most effective wavelengths selected in the hybrid approach ANN-PSO, described in Section 2. Tables 7 and 8 and Figure 16 show the effective wavelengths selected by this method for the non-destructive estimation of BrimA, as well as the results of different performance evaluation criteria obtained in the estimation of BrimA using different numbers of effective wavelengths. Figure  16 presents a comparison of the measured values versus the estimated values of BrimA using the five most effective wavelengths selected by the hybrid ANN-PSO. The highest value of R 2 is 0.828 for the non-destructive estimation of the value of BrimA, and it is related to the input data by the hybrid ANN-ABC method with five wavelengths.

Estimation of the Firmness
Tables 9 and 10 and Figure 17 present the results of the non-destructive estimation of firmness using the most effective wavelengths. According to Table 10, the hybrid ANN-ABC method is not able to estimate correctly the firmness of the apples in four of the five cases. Only the estimation using nine wavelengths achieves an R 2 of 0.738, which is still not a very high value. This problem is consistent with the results obtained using all the spectral information, where it was observed that the firmness of the apples could not be estimated accurately.

Estimation of the Acidity
The results of the proposed non-destructive estimation of acidity are presented in Tables 11 and 12 and in Figure 18, using in this case the seven most effective wavelengths.   As shown, the highest R 2 in the estimation of acidity is related to the case that uses seven wavelengths as the input of the hybrid ANN-ABC method. The value of R 2 is greater than 0.9 in this case, which can be considered a very accurate estimation. Table 13 presents the most effective wavelengths selected by the hybrid ANN-PSO method for the non-destructive estimation of the starch content of the apples. Table 14 shows the results of the performance criteria of the hybrid ANN-ABC using different numbers of effective properties. The comparison between the measured values and the estimated values of starch content using the five wavelengths selected by the hybrid ANN-PSO method are depicted in Figure 19. As shown in Table 14, the highest R 2 is related to the case that uses five wavelengths to estimate the amount of starch, and it is equal to 0.923, which is again a very good result.

Non-Destructive Estimation of the Firmness
This subsection compares the accuracy of the proposed method with the results reported by other authors that also estimate the firmness of different fruits using spectral information. Three works have been found in the literature, proposed by Bizzani et al. [20], Uwadaira et al. [35] and Huang et al. [36]. Table 15 describes the main features of these works and the obtained values of the coefficient of determination, R 2 .  [20] Orange 1000 to 2500 nm 0.92 Uwadaira et al. [35] Peach 500 to 1000 nm 0.8 Huang et al. [36] Tomato 300 to 550 nm 0.894 Coefficient of determination, R 2.
As shown in Table 15, the highest R 2 of this property is achieved in the spectral range between 1000 and 2500 nm. Since the amount of tissue firmness is directly related to the amount of fruit juice, it is possible to perform the non-destructive prediction of the amount of tissue firmness by the opposite action of the NIR spectrum. According to Abbott's research, there is an absorption peak between spectra of 1400 nm and 1500 nm due to the presence of water in the fruit tissue [37]. This justifies that the R 2 obtained in our work is not very high, since the spectral range is outside of the ideal range.

Non-Destructive Estimation of the Acidity
In the case of the acidity, the most related works are due to Huang et al. [36], Cavaco et al. [38] and Cayuela [23]. Table 16 shows the comparison of the proposed method and these works. Table 16. Comparison of the proposed method with other previous studies for the non-destructive estimation of the acidity based on the coefficient of determination, R 2 .
As shown in Table 16, the R 2 of the proposed method is higher than those of the other methods for the non-destructive estimation of the acidity, but still, it is not an acceptable value. The reasons for this case may be similar to those for the titratable acidity.

Non-Destructive Estimation of the Starch Content
Concerning the estimation of the starch content in fruits, only two previous papers were found, due to Jiang and Lu [39] and Ignat et al. [40]. Table 17 compares the results reported in these works with the proposed method.
As can be observed in Table 17, the results of all these studies are acceptable because they have high coefficients of determination. The major spectral regions of starch aggregation are the spectral region from 800 to 1000 nm, and the wavelengths greater than 1700 nm [37]. This table shows that the spectral domain has an acceptable range in all studies and, thus, the results are acceptable.

Conclusions
In this study, a new non-destructive method based on the hybrid Artificial Neural Networks-Particle Swarm Optimization (ANN-PSO) algorithm and on the hybrid Artificial Neural Networks-Artificial Bee Colony (ANN-ABC) algorithm has been proposed to estimate some mechanical and physicochemical properties of Red Delicious apples, namely BrimA, firmness, acidity and starch content, using spectral data in the range between 400 and 1000 nm.
Four main conclusions can be drawn from the experimental results. First, the selection of the appropriate spectral ranges is essential to increase the estimation accuracy of the spectral data-based methods. Second, the predicted starch content of the Red Delicious apple was very close to actual measured values in the spectral range from 400 to 1000 nm. Third, the results obtained with the use of the most effective wavelengths produced coefficients of determination lower than those obtained using a wide range of spectral properties, but the difference was not significant. Fourth, the selection of the most appropriate spectral range, and the use of effective machine learning techniques guaranteed high performance of the proposed method in the present study.
For future works, we suggest developing a non-destructive method to estimate the ripeness of Red Delicious apples. The spectral measurements of the above-mentioned physicochemical properties will be used as features to determine the ripening state of the fruits. Artificial Neural Networks (ANN) and deep learning techniques could be an interesting way to achieve this goal.