## 4 Results and Discussion
### The Final Model Results and Discussion  
Finally, while the second step allowed the identification of the optimal model to be used, the third step allowed the identification of the optimal subset of wavelengths to be considered.  
The model coefficients (BETA or the wavelength multipliers) arise from the third step; in our case, \(\mathrm{S}\geq 5\) is considered. The model calculation has calculated 11 estimates (the 11 values assigned to EXTCV from 20% to 70%) of each BETA coefficient. Therefore, the  
Figure 8: FNR values versus EXTCV for the optimal \(\mathrm{S}\geq 5\). An exponential fit (\(\mathrm{y}=\mathrm{a}*\mathrm{exp}(\mathrm{b}*\mathrm{x})\)) has been considered on these data and a threshold of 0.01% has been used to express a SCORE. SCORE for FNR represents EXTCV value at which FNR reaches 0.01%.  
Figure 9: FPR values versus EXTCV for optimal \(\mathrm{S}\geq 5\). An exponential fit (\(\mathrm{y}=\mathrm{a}*\mathrm{exp}(\mathrm{b}*\mathrm{x})\)) has been considered on these data and a threshold of 0.01% has been used to express a SCORE. SCORE for FPR represents EXTCV value at which FPR reaches 0.1%.  
model BETA coefficients are the mean of these values; in addition, the CV% is calculated to show the uncertainty of these BETA values.  
Figure 10 shows the BETA coefficients value (262) and their uncertainty expressed as CV%. The average value of CV% is acceptable. However, two wavelengths have a CV% value higher than the others; this can be a symptom that the corresponding wavelength should be neglected because the value of the coefficient is near zero.  
Because of this, the wavelengths with a CV% value greater than 15% have been further removed and the subsequent wavelengths subset was consequently obtained by purging the problematic wavelengths. Thus, the subset was reduced to 247 wavelengths.  
Figure 11 shows the BETA coefficients value (247) and their uncertainty expressed as CV% for the final model. The data in Figure 11 have been obtained after 500 Monte Carlo runs assessing the FNR (0.004% +/ \(-\) 0.003) and FPR (0.02% +/ \(-\) 0.01) using an EXTCV of 50% of the overall randomized samples. The CV% of all the coefficients is less than 10%, showing a low uncertainty of the BETA coefficients over the overall of the Monte Carlo runs (the mean CV% is 3.1%).  
Figure 11: BETA coefficients of final model and their uncertainty; FNR and FPR, after 500 Monte Carlo runs, are 0.004% +/ \(-\) 0.003 and 0.02% +/ \(-\) 0.01 respectively. Considered EXTCV is set to 50% of randomized overall samples. The dotted blue line represents the mean of CV%.  
Figure 10: BETA coefficients of model arising from the third step and their uncertainty (in red). The dotted blue line represents the mean of CV%.  
Furthermore, in Figure 11, it can be visually observed that two wavelengths (1132 and 1223 nm) have a greater negative BETA coefficient. This could be related to their capacity to identify the HEALTHY cherries (HEALTHY cherries are identified by a negative Y prediction value); however, this could not be statistically demonstrated because the model considering only these two wavelengths and the constant term did not have acceptable FNR and FPR (49.8% and 44.8% respectively).  
Finally, Figure 12 shows where the selected wavelengths are, as well as showing the average normalized spectrum of all HEALTHY and INFECTED cherries.  
There is an extended gap of not selected wavelengths between 600 and 700 nm. This corresponds to the orange-to-dark-red color range. Therefore, the orange-to-dark-red color range is uninformative with regard to the presence or absence of SWD eggs. Moreover, Figure 12 shows that the information concerning the SWD eggs identification is related to the 170-600 nm range (UV-orange) and 700-1300 nm range (shortwave near-infrared).