Determination of the Most E ﬀ ective Wavelengths for Prediction of Fuji Apple Starch and Total Soluble Solids Properties

: Proper physical properties and standard chemical properties are among the criteria that consumers use to select fruits. Recently, researchers attempted to develop non-destructive methods for measuring properties, among which the near-infrared (NIR) spectroscopy is of great use. Fuji apples were collected in three di ﬀ erent growth stages, and then starch and soluble solids were extracted. Spectral data in the range of 800 to 900 nm were used to predict the amount of starch content and 920 to 980 nm to estimate total soluble solids (TSS). Reﬂectance spectra were pre-processed and the most e ﬀ ective wavelengths of each property were selected using hybrid artiﬁcial neural network-simulated annealing (ANN-SA). Non-destructive estimation of physicochemical properties was conducted using spectral data of the most e ﬀ ective wavelengths using a hybrid artiﬁcial neural network-biogeography-based optimization algorithm (ANN-BBO). The results indicated that the regression coe ﬃ cient of the best state of training for predicting starch was 0.97 and of TSS was 0.96, while R 2 was 0.92 for both. The most e ﬀ ective wavelengths were 852.58, 855.54, 849.03, 855.83, 853.47, 844.90 nm for starch and 967.86, 966.67, 964.90, 958.40, 957.22, 963.97 nm for TSS.


Introduction
Apples are among the most popular and nutritious fruits. Depending on the climate and soil of each region of the globe, different fruit varieties grow. Standards must be considered to distribute these fruits domestically or for export to other countries; otherwise, they will be damaged in the postharvest stages which causes loss of quality. Generally, the quality of fruits should be considered from the perspectives of external and internal quality. Much research has been conducted to measure the external quality of fruits, such as size, weight, and no fruit skin damage [1][2][3]. Internal quality includes soluble solids content (SSC), titration acidity (TA), and starch [4]. Unlike external quality, internal quality measurement methods are destructive, time-consuming, and costly [5].
Vis-NIR spectroscopy has been used for different purposes on different fruits such as orange [16], kiwi [17], apricot [18], pear [19], and apple [20]. Vis-NIR spectroscopy was used by Uwadaira et al. [21] Appl. Sci. 2020, 10 for non-destructive evaluation of peach fruit. In another study conducted by Oliveira-Folador et al. [22], a fast method for quality evaluation was proposed for passion fruit using NIR and mid-infrared spectroscopy methods. Color is one of the most critical factors in the quality of fruits [23][24][25]. Schouten et al. [26] demonstrated that Vis-NIR could be used to detect chlorophyll and lycopene levels in tomato accurately. In another study conducted by Tilahun et al. [27], lycopene and beta-carotene were estimated by chromatography and Vis-NIR spectra on tomatoes. Hernández-Hernández et al. [28] described a portable application that uses color segmentation and a probabilistic approach based on histograms in the optimum color space to optimize the water needs calculation.
As observed, researchers have focused on the non-destructive estimation of the physicochemical properties of different fruits due to the high speed of monitoring operation during growth to consumption. Previous research uses statistical methods to estimate properties, which are linear methods and often mistaken for complex data or use a simple artificial neural network (ANN) without optimal adjustment. In addition, in most research, the prediction of properties is performed only once, making it impossible to check the methods' reliability.
This paper aims to determine the most effective wavelengths for non-destructive prediction of total soluble solids and starch of Fuji apples at different stages of their growth using a hybrid artificial neural network-biogeography-based optimization algorithm (ANN-BBO). This may help create portable tools that can be used in the field to optimize orchard management during harvest time and postharvest operations. Optimal adjustment of the parameters of the artificial neural network (including the number of layers, number of neurons, transfer function, backpropagation network training function, and backpropagation weight/bias learning function using an algorithm based on biogeography) ensures the method's maximum performance for predicting starch properties and soluble solid content. The selection of the most effective wavelengths among whole wavelengths using a simulated annealing algorithm selects the effective spectra based on the thinking behind the metal annealing operation. Repeating the non-destructive estimation operation 100 times measures the reliability of the proposed algorithm.

Materials and Methods
For non-destructive detection of starch and total soluble solids (TSS) in Fuji apple, an estimation algorithm needs to be trained. Figure 1 illustrates the flowcharts of the different training steps of this algorithm. As can be observed, five necessary steps are needed to train. Each step is described below. Vis-NIR spectroscopy has been used for different purposes on different fruits such as orange [16], kiwi [17], apricot [18], pear [19], and apple [20]. Vis-NIR spectroscopy was used by Uwadaira et al. [21] for non-destructive evaluation of peach fruit. In another study conducted by Oliveira-Folador et al. [22], a fast method for quality evaluation was proposed for passion fruit using NIR and midinfrared spectroscopy methods.
Color is one of the most critical factors in the quality of fruits [23][24][25]. Schouten et al. [26] demonstrated that Vis-NIR could be used to detect chlorophyll and lycopene levels in tomato accurately. In another study conducted by Tilahun et al. [27], lycopene and beta-carotene were estimated by chromatography and Vis-NIR spectra on tomatoes. Hernández-Hernández et al. [28] described a portable application that uses color segmentation and a probabilistic approach based on histograms in the optimum color space to optimize the water needs calculation.
As observed, researchers have focused on the non-destructive estimation of the physicochemical properties of different fruits due to the high speed of monitoring operation during growth to consumption. Previous research uses statistical methods to estimate properties, which are linear methods and often mistaken for complex data or use a simple artificial neural network (ANN) without optimal adjustment. In addition, in most research, the prediction of properties is performed only once, making it impossible to check the methods' reliability.
This paper aims to determine the most effective wavelengths for non-destructive prediction of total soluble solids and starch of Fuji apples at different stages of their growth using a hybrid artificial neural network-biogeography-based optimization algorithm (ANN-BBO). This may help create portable tools that can be used in the field to optimize orchard management during harvest time and postharvest operations. Optimal adjustment of the parameters of the artificial neural network (including the number of layers, number of neurons, transfer function, backpropagation network training function, and backpropagation weight/bias learning function using an algorithm based on biogeography) ensures the method's maximum performance for predicting starch properties and soluble solid content. The selection of the most effective wavelengths among whole wavelengths using a simulated annealing algorithm selects the effective spectra based on the thinking behind the metal annealing operation. Repeating the non-destructive estimation operation 100 times measures the reliability of the proposed algorithm.

Materials and Methods
For non-destructive detection of starch and total soluble solids (TSS) in Fuji apple, an estimation algorithm needs to be trained. Figure 1 illustrates the flowcharts of the different training steps of this algorithm. As can be observed, five necessary steps are needed to train. Each step is described below.

Data Collection
The first step was to train a non-destructive prediction algorithm for the fruit properties of starch and TSS. For this purpose, 140 samples of Fuji apple were collected at three different stages of maturity from different trees of different gardens in Kermanshah, Iran (34 • 18 N 47 • 4 E). Initially, Fuji apple ripening time was determined based on 45 samples collected 14 and 7 days before maturity and 50 samples at maturity time. At each stage, samples were transferred to the laboratory to measure TSS and starch properties.

Extraction of Spectral Properties of Samples
After harvesting the samples at each stage of maturity, the spectral properties of each were extracted. The hardware used includes the spectrophotometer EPP200NIR (StellarNet, Tampa, FL, USA) which was equipped with an indium-gallium-arsenide detector with a range of 400 to 1000 nm, light source SLI-CAL (StellarNet, Tampa, FL, USA) 20 W tungsten halogen light, and laptop Intel Corei3CFI with 330 M at 2.13 GHz, 4 GB of RAM. Spectra Wiz software used for saving the spectral data. Two optic fibers were used for transmitting light to the samples and then from there to the spectrometer.
It should be noted that the spectral data measured of each apple was a reflection spectrum. Spectral charts contain several peaks, showing that spectral ranges around these peaks contain essential information on the fruit properties [29]. After receiving reflectance spectra from each sample, these spectra were converted to absorption spectra using Equation (1). The purpose of this pre-processing of the extracted spectral data was to establish a linear relationship with the molecular concentration of the samples [30]: Absorption spectra = log(1/Reflectance spectra). (1)

Destructive Measurement of the Starch Property
Starch is a homopolymeric carbohydrate of the sugar glucose. During the ripening process, starch turns into sugar, so it is possible to estimate the fruit's ripening stage. The method described by Hedge and Hofreiter [31] was used in this paper. The various steps that were taken to measure the amount of starch in apples are as below: (1) Peeling a part of the apple and cutting a piece of 0.5 g from it.
(2) Crushing the piece with a mortar and extracting apple juice.
(3) Preparing a buffer using the phosphate buffer solution. (4) Mixing the sediment from step (2) with 1.5 mL of buffer solution. (5) Performing centrifugation at 12,000 rpm for 20 min to completely separate the sediment from the mixture. (6) After complete separation of the precipitate from the solution, the resulting precipitate was mixed with a mixture of dimethyl sulfoxide/hydrochloric acid 4:1 and centrifuged at a speed of 12,000 rpm for 20 min. (7) Mixing the solution obtained from step (6) with iodine-hydrochloric acid reagent in a ratio of 1 to 5 and recording the number of absorption using a spectrophotometer (Optizen 2120 UV plus, Company: Mecasys Co., Ltd., Yuseong-gu, Daejeon, Korea) at 600 nm and the results were presented in terms of mg/g.

Destructive Measurement of TSS Property
A refractometer was used to measure total soluble solids. The amount of sugar obtained by different refractometers is expressed in different units, but in most cases, it is • Brix. Degrees Brix consists of sugars, organic acids, soluble amino acids (except proteins as they are not soluble), alcohol, minerals, fat, and flavonoids (Vitamin C and Vitamin A). Brix is considered a measure of sweetness of fruits /fruit juices because the portion of sugar content is nearly 80%, while the portion of other solids is little. However, if the proportion of other components increases, they can influence Brix. Brix cannot discriminate different sugars but indicates the total content of all sugars. The • Brix, measured at 200 C , represents the total sugar content of fruit. Therefore, • Brix 50 indicates that the fruit has 50% of TSS (https://felixinstruments.com/blog/brix-as-a-metric-of-fruit-maturity/). Brix is equal to the amount of sugar (gr) contained in 100 g of fruit. Aqueous refractometers are commonly used to obtain TSS. The basis of refractometers is light refraction. Light is refracted by passing through two heterogeneous environments. As the concentration of the solution increases, the refractive index of light increases linearly [32].

Spectrum Used for Non-Destructive Estimation of Starch and TSS Properties
Spectral graphs of the Fuji apple samples have several peaks, including peaks at wavelengths of 496, 549, 683, 849, 875, and 962 nm. In this study, spectral data around these peaks were analyzed, and starch and TSS properties were estimated. For non-destructively estimation of starch content and TSS, the spectral peaks with the best results were thoroughly analyzed. Therefore, spectral data of 800 to 900 nm could predict the amount of starch content, and spectral data of 920 to 980 nm to estimate TSS.
Predicting starch and TSS requires 3 to 9 wavelengths. Limiting factors to develop a portable device are cost and size. Therefore, the number of wavelengths used for prediction should be as low as possible. Thus, it is crucial to select the most effective wavelengths. In this study, a hybrid ANN-simulated annealing algorithm was used to select the most effective wavelengths. This algorithm is like the metal annealing operation process performed repetitively to achieve a stable material state with lowest energy use [33]. Table 1 gives the hidden layer structure of the neural network used to select the most effective wavelengths. Each neural network has an input and an output vector. The output vector contains data on fruit properties and the input vector contains spectral data. The simulated annealing algorithm has the task of selecting adequate inputs to the ANN. Following this procedure, the simulated annealing algorithm introduces vectors of different sizes as inputs to the ANN and records the optimal vector. Different wavelengths within the vector are chosen as the most effective wavelengths. Table 1. The hidden layer structure of artificial neural network (ANN) used to select the most effective wavelengths (tansig is transfer function; traincgb is training function; learnwh is learning function).

Non-Destructive Estimation of Starch and TSS Properties
Non-destructive estimation of starch and TSS was performed using a hybrid ANN-biogeography-based optimization (BBO). The hybrid ANN-BBO algorithm is inspired by how different animal and plant species are distributed in different parts of the universe [34]. The different steps of the bio-based algorithm are as follows.

1.
Generating the initial population or so-called initial random habitat and sorting them; 2.
Determining migration and immigration rates; 3.
Repeating step 4-8 for each habitat such as j; 4.
Steps 5 to 8 are repeated for each variable such as k at location j; 5.
Changes are made according to steps 6 to 8 with the probability of migrating to a habitation; 6.
Determine the origin of the migration using random values; 7.
Migrating from one habitation to another; 8.
Random changes (mutations) are applied to the variable; 9.
The set of new responses is evaluated; 10. Combining the original population with the migration-related population and creating a new stage population; 11. Return to step 3 if the termination is not fulfilled.
The purpose of this algorithm is to adjust the parameters of the multilayer perceptron (MLP). MLP has five adjustable parameters: the number of neurons, the number of layers, transfer function, the back-propagation network training function, and the back-propagation weight/bias learning function [35]. The number of neurons selectable for the first layer was between 1 and 25, and between 0 and 25 for the other layers. The number of layers was at least one and a maximum of 3. The transfer function for each layer was selected from 13 different functions, such as tansig. The back-propagation network training function was selected from 19 different functions, such as traincgb. Finally, the back-propagation weight/bias learning function was selected from 15 different functions, such as learnwh. These are the functions available in the toolbox of the artificial neural network of MATLAB.
ANN's input is the spectral data, and its output is the starch content and TSS. The BBO algorithm adjusts the vector's network structure in each step of the training ANN, and the result is recorded as the mean squared error (MSE). Finally, any vector of adjustable parameters with the least MSE is considered as the optimal vector. After selecting the optimal structure of ANN, 100 replications were performed to evaluate the reliability of ANN. It should be noted that among 140 samples, after extracting spectral properties, 60% were randomly used as training data, 10% as validation data, and 30% as test data.

Performance Evaluation Criteria for Starch and TSS
Coefficient of determination (R 2 ), sum squared error (SSE), mean absolute error (MAE), mean square error (MSE), root mean square error (RMSE) were used to evaluate the performance of starch and soluble solids [36]. Figure 2 represents the diagrams of the reflectance spectra, and the spectra converted to absorption of Fuji apples. As can be seen, there are different peaks in the absorption spectral graphs, each containing useful information to predict different physicochemical properties. Appl. Sci. 2020, 10, x FOR PEER REVIEW 6 of 15

Wavelengths Selection by the Hybrid ANN-SA
Diagrams of the reflectance spectra and the spectra converted to absorption of Fuji apples were created from samples at different maturity times. Different peaks in the absorption spectral graphs represented useful information to predict Fuji apples' starch and TSS properties.  Table 2 gives the optimal structure of the ANN hidden layers adjusted by the biobased optimization algorithm to predict starch and TSS. As can be seen, the best ANN structure for predicting starch content and TSS is three layers and two layers, respectively.

Wavelengths Selection by the Hybrid ANN-SA
Diagrams of the reflectance spectra and the spectra converted to absorption of Fuji apples were created from samples at different maturity times. Different peaks in the absorption spectral graphs represented useful information to predict Fuji apples' starch and TSS properties. Estimating the starch content for non-destructive Fuji apple, the most effective wavelengths selected by hybrid ANN-SA algorithm were 852. 58 Table 2 gives the optimal structure of the ANN hidden layers adjusted by the bio-based optimization algorithm to predict starch and TSS. As can be seen, the best ANN structure for predicting starch content and TSS is three layers and two layers, respectively.  Figure 3 represents the regression plot between the mean estimated and actual amount of starch of Fuji apples based on spectral data of 800 to 900 nm. As mentioned, 100 iterations were executed to evaluate the hybrid ANN-BBO method's reliability in predicting starch. The regression coefficient was 0.97 for predicting starch, indicating the algorithm's high accuracy in predicting starch at the given spectral range. Figure 4 represents the criteria evaluating the performance of the ANN-BBO for predicting the starch content of Fuji apple at 100 iterations. These graphs indicate that in all iterations, the regression coefficient value for starch was higher than 0.87, and in the best state of training, it was close to 0.97.

Performance of the Hybrid ANN-BBO in Estimating Fruit Properties Based on Spectral Data
According to Figure 5, the regression coefficient of 0.94 for predicting TSS implies that TSS estimation at the range of 920-980 is highly accurate. Figure 6 illustrates that in all iterations, the prediction algorithm's regression coefficient was higher than 0.83. In the best state of training, it was close to 0.96. The performance of hybrid ANN-BBO was evaluated using boxed diagrams of mean estimated and actual starch and actual TSS of apple at the range of 800 to 900 nm. Most samples' box diagrams were almost overlapped, indicating close results between estimated and actual starch values and TSS values.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 7 of 15 Figure 3 represents the regression plot between the mean estimated and actual amount of starch of Fuji apples based on spectral data of 800 to 900 nm. As mentioned, 100 iterations were executed to evaluate the hybrid ANN-BBO method's reliability in predicting starch. The regression coefficient was 0.97 for predicting starch, indicating the algorithm's high accuracy in predicting starch at the given spectral range. Figure 4 represents the criteria evaluating the performance of the ANN-BBO for predicting the starch content of Fuji apple at 100 iterations. These graphs indicate that in all iterations, the regression coefficient value for starch was higher than 0.87, and in the best state of training, it was close to 0.97.    According to Figure 5, the regression coefficient of 0.94 for predicting TSS implies that TSS estimation at the range of 920-980 is highly accurate. Figure 6 illustrates that in all iterations, the prediction algorithm's regression coefficient was higher than 0.83. In the best state of training, it was close to 0.96. The performance of hybrid ANN-BBO was evaluated using boxed diagrams of mean estimated and actual starch and actual TSS of apple at the range of 800 to 900 nm. Most samples' box diagrams were almost overlapped, indicating close results between estimated and actual starch values and TSS values.     Figure 7 shows the regression plot between the mean estimated and actual starch of Fuji apple (test set) based on the most effective wavelengths. Each iteration included 140 test samples, so there will be 14,000 samples in 100 iterations. The regression coefficient of the ANN-BBO method was above 0.96. Figure 8 illustrates the hybrid ANN-BBO method's performance in estimating the starch content using data of the most effective wavelength. Results of different iterations had close results in the estimation of starch.

Performance of the Method in Estimating Fruit Properties Based on the Most Effective Wavelengths
Appl. Sci. 2020, 10, x FOR PEER REVIEW 9 of 15 Figure 7 shows the regression plot between the mean estimated and actual starch of Fuji apple (test set) based on the most effective wavelengths. Each iteration included 140 test samples, so there will be 14,000 samples in 100 iterations. The regression coefficient of the ANN-BBO method was above 0.96. Figure 8 illustrates the hybrid ANN-BBO method's performance in estimating the starch content using data of the most effective wavelength. Results of different iterations had close results in the estimation of starch.     Figure 9 represents the regression plot between the mean estimated and the actual (measured) TSS using data of effective wavelengths. The regression coefficient of the ANN-BBO method was above 0.94. Figure 10 indicates that hybrid ANN-BBO has close estimations for TSS in different iterations. Box diagrams representing the difference between actual and mean estimated starch content and TSS of Fuji apples using the proposed ANN-BBO method showed a close relationship.

Performance of the Method in Estimating Fruit Properties Based on the Most Effective Wavelengths
Appl. Sci. 2020, 10, x FOR PEER REVIEW 10 of 15 Figure 9 represents the regression plot between the mean estimated and the actual (measured) TSS using data of effective wavelengths. The regression coefficient of the ANN-BBO method was above 0.94. Figure 10 indicates that hybrid ANN-BBO has close estimations for TSS in different iterations. Box diagrams representing the difference between actual and mean estimated starch content and TSS of Fuji apples using the proposed ANN-BBO method showed a close relationship.

Properties of Starch
As seen in Figure 11, the regression coefficients obtained using spectral data of 800 to 900 and effective spectral data are above 0.97, which means the starch content is predictable. Table 3 gives the mean and standard deviation of the ANN-BBO algorithm predicting the starch of apples in 100 As seen in Figure 11, the regression coefficients obtained using spectral data of 800 to 900 and effective spectral data are above 0.97, which means the starch content is predictable. Table 3 gives the mean and standard deviation of the ANN-BBO algorithm predicting the starch of apples in 100 iterations and the values of the various criteria in the best state of training using spectral data of 800 to 900 nm and the data of the most effective wavelength. Given the nearly identical performance in different iterations, it can be said that the proposed method has high reliability.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 11 of 15 iterations and the values of the various criteria in the best state of training using spectral data of 800 to 900 nm and the data of the most effective wavelength. Given the nearly identical performance in different iterations, it can be said that the proposed method has high reliability.
(a) (b) Figure 11. Regression analysis of scatter plot at the best state of training of ANN-BBO to predict starch content of Fuji apple, (a) based on spectral data in the range of 800 to 900 nm, (b) based on spectral data of the most effective wavelengths. Table 3. Comparison of the mean and standard deviation of criteria of ANN-BBO for estimating starch content of Fuji apple in 100 replicates using spectral data of 800 to 900 nm and data on effective wavelengths.  As seen in Figure 12, the regression coefficients obtained by data based on 920 to 980 nm and the most effective wavelengths are above 0.95, and thus TSS of Fuji apples can be predicted with both data types. According to Table 4, the mean and standard deviation of the hybrid ANN-BBO at 100 iterations using spectral data of 920 to 980 nm and the effective wavelength is near similar; therefore, the proposed method is highly reliable.  After investigating the proposed algorithm's performance using different criteria, the results

Comparison of the Proposed Method with Other Researchers
After investigating the proposed algorithm's performance using different criteria, the results were compared with other researchers' results. Table 5 gives a comparison of the different studies. As can be seen, the proposed method based on spectral data has a high regression coefficient at the best state of training and using the most effective wavelengths, indicating the high performance of the proposed method.
Most methods published on a non-destructive estimation of fruit properties are based on samples collected and assessed under controlled laboratory conditions after fruit temperature equilibration [37]. Predictions of non-destructive methods based only on internal validations tend to be overestimated in the literature. A comparison between internal and external validations is needed to demonstrate NIR's real potentialities in field conditions [38]. [39] using linear (partial least squares regression, PSLR) and nonlinear (artificial neural network, ANN) regression estimation of firmness, acidity (pH), and starch content of 160 Fuji apple fruit showed less robust estimation of starch content with R 2 0.865 for ANN and 0.91 for PLSR.

Conclusions
This study proposed a hybrid ANN-BBO algorithm based on spectral data of 800 to 900 nm and 920 to 980 for non-destructive estimation of two properties, namely starch and TSS. The most important results are: 1.
The most effective wavelengths selected by hybrid artificial neural network-simulated annealing algorithm to estimate TSS correspond to the wavelengths around the peak of 950 nm. In addition, the most effective wavelengths estimate starch corresponds to the wavelengths around the peak of 850 nm.

2.
Due to the small amount of standard deviation of the results obtained by hybrid ANN-BBO in 100 iterations, it can be said that the proposed method has high reliability because of close results in different iterations.

3.
The TSS were predicted with a regression coefficient above 0.8 in all iterations. Since this feature is related to the ripening stage of fruits, a high-performance portable device can estimate Fuji apple's ripening stage using the most effective wavelengths to manage post-harvest operations better.
Precision agriculture requires the availability of portable tools that can be used in the field. The results help optimize Fuji apples' harvest time and apply precision agriculture at the orchard, supporting the postharvest operations. One of the requirements of portable devices that can be used in orchards is their portable size and low price. Since effective wavelengths are selected from different ranges, the amount of extracted data from each apple sample was reduced. Thus, a portable device predicting starch and TSS values can be developed. Another advantage of the proposed method was using the biogeography-based optimization evolutionary algorithm, which optimally adjusts the artificial neural network's main parameters and, in practice, ensures its high efficiency in estimating starch and TSS values. External validation is needed in order to demonstrate the real potentialities of NIR in field conditions. Author Contributions: Conceptualization, R.P. and S.S.; methodology, S.S.; validation, T.P., S.S. and S.J.; formal analysis, S.S. and T.P.; investigation, R.P.; writing-original draft preparation, R.P., S.S. and T.P.; writing-review and editing, T.P.; visualization, T.P.; supervision, T.P, S.S. and S.J. All authors have read and agreed to the published version of the manuscript.