# Low-Cost Handheld Spectrometry for Detecting Flavescence Doree in Vineyards
## 3 Results
### Classification Performance  
The model for the vineyard health classification to the classes of \"Healthy\" as FD-negative, and \"Diseased\" as FD-positive was trained using different classifiers (LR, SVMs, XGBoost, RF, and Cubist) and reported the best models' accuracies at each growth stage in Tables 3-5. In the first scenario, the models were trained using the training set and assessed the performance using test samples while in the second scenario, the models were trained using the whole dataset and assessed the performance using the LOO cross-validation method. Table 3 shows the classification results of the test set for both sensors using all bands, reduced by the ensemble method, and then finally using GA. The results of the Hamamatsu sensor are reported in Table 3 where we can see that when all bands were considered the accuracy ranges from 61% to 89% while for the NIRScan sensor it ranges from 61% to 72%. The Hamamatsu sensor shows better accuracy than the NIRScan sensor except in the third week (21 June 2022) when the NIRScan showed the same accuracy of 72%. The highest accuracy is achieved in the fourth week (1 July 2022) for the Hamamatsu sensor when all the bands were used. The classification accuracy pattern of both sensors is with respect to growth stages; the highest accuracy is achieved in the fourth week where Hamamatsu all bands give an accuracy of 89% and NIRScan gives 72% in the third week, but a drop in accuracy is observed where on the fifth week both sensors achieved 61% accuracy to classify healthy diseased plants. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Dates** & \multicolumn{2}{c}{**Hamamatsu**} & \multicolumn{4}{c}{**NIRScan**} \\ \hline  & & **Features (100)** & **Features** & **Features (100)** & **Features** \\  & **All Bands (288)** & **Selected by** & **Selected by** & **All Bands (28)** & **Selected by** & **Features** \\  & & **Ensemble** & **Ga Method** & & **Ensemble** & **Ga Method** \\ \hline
8 June 2022 & 67 & 72 & 61 (6) & 61 & 61 (10) \\
15 June 2022 & 67 & 72 & 78 (9) & 61 & 67 & 61 (8) \\
21 June 2022 & 72 & 78 & 61 (13) & 72 & 67 & 72 (6) \\
1 July 2022 & 89 & 78 & 89 (13) & 61 & 61 & 61 (10) \\
6 July 2022 & 61 & 61 & 61 (12) & 61 & 67 & 72 (7) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Classification accuracies (%) using all bands, ensemble-based reduced features, and features reduced by the genetic algorithms (GA) technique of both sensors (Hamamatsu and NIRScan) with leave-one-out (LOO) cross-validation on the whole dataset. In the column “Feature selected by GA method” the values outside and inside the brackets correspond to accuracy (%) and features selected by GA, respectively. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Dates** & \multicolumn{2}{c}{**Hamamatsu**} & \multicolumn{4}{c}{**NIRScan**} \\ \hline  & & **Features (100)** & **Features** & **Features (100)** & **Features** \\  & **All Bands (288)** & **Selected by** & **Selected by** & **All Bands (28)** & **Selected by** & **Selected by** \\  & & **Ensemble** & **Method** & **Ga Method** & **Ga Method** & **Ga Method** \\ \hline
8 June 2022 & 67 & 72 & 61 (6) & 61 & 61 (10) \\
15 June 2022 & 67 & 72 & 78 (9) & 61 & 67 & 61 (8) \\
21 June 2022 & 72 & 78 & 61 (13) & 72 & 67 & 72 (6) \\
1 July 2022 & 89 & 78 & 89 (13) & 61 & 61 & 61 (10) \\
6 July 2022 & 61 & 61 & 61 (12) & 61 & 67 & 72 (7) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Classification accuracies (%) using all bands, ensemble-based reduced features, and features reduced by genetic algorithms (GA) technique of both sensors (Hamamatsu and NIRScan) on test samples. In the column “Feature selected by GA method” the values outside and inside the brackets correspond to accuracy (%) and features selected by GA, respectively. The results based on the Hamamatsu-reduced data by the ensemble method show that the accuracy ranges from 61% to 78% while, for the data further reduced by GA, the accuracy ranges from 61% to 89%.