## 5 Conclusions  
Due to the advantages and effectiveness of the spectrophotometric techniques, the use of the Vis/SWNIR spectral range was evaluated by developing a spectrophotometric method to rapidly detect postharvest SWD infestations of intact sweet cherry.  
To model the data fit/prediction, PCR and PLS algorithms were selected.  
The EXTCV was initially set to 20% of the overall available samples, then increased to 50% in the final selected optimal model.  
The building of the final optimal model consisted of a three-step procedure. Each step was statistically evaluated using the Monte Carlo technique. This technique was extensively used in this work to statistically assess all the parameters and coefficients.  
The identification of wavelengths best explaining the property of the samples was successfully addressed by considering the regression coefficients coming out from the model cross-validation, then applying the CVA method.  
In conclusion, the following points can be highlighted.  
1. The CVA method demonstrated its usefulness in selecting the best-explaining wavelengths.
2. The selection of the optimal M-D-OPTN model has been performed on randomized repetitions using the Monte Carlo technique.  
Figure 12: Final model selected wavelengths (247) and average normalized spectrum of all HEALTHY and INFECTED cherries.  
3. The procedure in three steps, adopted to manage the regression algorithms, allowed the selection of a very reliable prediction model; its FNR and FPR, after 500 Monte Carlo runs, were 0.004% +/\(-\) 0.003 and 0.02% +/\(-\) 0.01, respectively.
4. A total of 50% of the samples have been used as EXTCV, and therefore the prediction model is highly performant; indeed, with regard to the FNR, the model wrongly identified only 4 cherries out of 100,000 as not infected (being however infected).
5. The final model is robust from the point of view of the temperature variations of the samples; indeed, the model was built taking into account the spectra variations due to temperature changes with 50% of the samples at different temperatures.  
The practical application of this study is related to the early on-line detection of postharvest SWD infestations of intact sweet cherry fruit, to be employed on processing lines in packing houses. To this end, because the use of the integrating sphere is difficult to apply on the processing lines, the same management procedure of the spectrophotometric models will be evaluated using a less expensive hyperspectral camera with a reduced discrete set of wavelengths.  
All authors contributed equally to this work. All authors have read and agreed to the published version of the manuscript.  
This study was carried out within the Agritech National Research Center and received funding from the European Union Next-GenerationEU (PIANO NAZIONALE DI RIPRESA E RESILIENZA (PNRR)--MISSIONe 4 COMPONENTE 2, INVESTIMENTO 1.4--D.D. 1032 17/06/2022, CN00000022). This manuscript reflects only the authors' views and opinions; neither the European Union nor the European Commission can be considered responsible for them.  
Not applicable.  
Data availability statement: Data are available upon request to the corresponding author.  
The authors declare no conflicts of interest.