# Low-Cost Handheld Spectrometry for Detecting Flavescence Doree in Vineyards
## 4 Discussion
When comparing the results of test samples (30% samples) and LOO cross-validation on the whole dataset, the test samples accuracy yielded slightly higher classification accuracies compared to the accuracies achieved by LOO cross-validation on the whole dataset. The train-test split approach estimates the performance of a model trained on a subset of the whole dataset which could bias the model's true performance. On the other hand, the LOO cross-validation is approximately unbiased because the difference in size between the training set used in each fold and the entire dataset is only a single pattern [52]. Classification accuracies were analyzed using complete spectra and also using the reduced spectral bands extracted by feature selection algorithms (Ensemble and GA). Feature selection is commonly used in the pre-processing of hyperspectral data to exclude irrelevant or less important features which helped to improve the performance of the model and also reduce the computational cost of modeling [19]. Higher classification accuracies were observed when the Hamamatsu sensor was used compared to the NIRScan sensor. By applying feature selection techniques, the feature set was reduced and using selected features we achieved comparable or even slightly better accuracies compared to those achieved when no feature selection is applied. The results of this study show the effectiveness of using the feature selection algorithm and overall better accuracies are achieved when reduced data was used to discriminate between healthy and diseased leaf spectra. The 13 key spectral bands of the Hamamatsu sensor extracted by GA are reported to be 374, 392, 395, 416, 479, 534, 622, 654, 683, 692, 713, 756, and 798 nm, which differentiate healthy and infected grapevine leaves with an accuracy of 89% (precision of 85%, recall of 100%, and F1 score of 92%, Table 6) with LR classifier by using test samples. On the other hand, in case of the NIRScan sensor, the maximum accuracy of 72% (precision of 71%, recall of 91%, and F1 score of 80%, Table 6) was achieved on the test samples with RF classifier using the reduced bands extracted by GA were 905, 933, 989, 1394, 1398, 1476, and 1691 nm. As the current study is based on a small sample size, to avoid overestimating the true accuracy, the classification results were also analyzed using LOO cross-validation. The best accuracies achieved from LOO cross-validation on the whole dataset are summarized in Table 7. The highest accuracy of 85% (precision of 85%, recall of 88%, and F1 score of 87%, Table 7) was achieved for the Hamamatsu sensor by using SVM classifiers trained by 100 spectral bands selected by the ensemble method. The selected 100 features were mainly (71% features) from the VIS spectral range (400-700 nm), 27% of the selected features were from the ultraviolet region, and only 2% of the features were from the NIR spectral region. In case of the NIRScan sensor, low accuracy of 68% (precision of 66%, recall of 88%, and F1 score of 75%, Table 7) was achieved by using GB classifiers trained by three spectral bands (937, 996, 1592 nm) selected by the ensemble method. Spectral regions similar to the ones identified in our study were also reported in other studies where authors used the spectral data to predict the classification of healthy grapevines and phytoplasma-infected ones, showing yellowing and leaf-roll symptoms, very similar to those of phytoplasma infections [5]. The spectral bands in the VIS-NIR range (400-840 nm) are considered critical to identify reflectance differences in leaves subjected to biotic stressors because reflectance in blue and red regions is sensitive to leaf pigment content (chlorophyll, carotenes, and xanthophyll) and might be an indicator of the plant health status [13,53]. These differences allowed several authors to successfully employ these methods for detecting biotic and abiotic stresses in grapevines [4,5,22].