## 3 Results
### Selected Wavelengths and Classification Results  
#### 3.3.1 Wavelengths Selection  
Through the implementation of the GA, the excessive number of wavelengths, originally comprising 2101, was effectively diminished to a more manageable and pertinent subset. The maximum number of GA-selected wavelengths was set to 30 in this study. Subsequently, SS, RF, and ANOVA were employed to assess the significance of each wavelength selected by the GA. This evaluation identified the wavelengths exhibiting elevated importance values, signifying their prominence in the classification task. These wavelengths, distinguished by their high importance, emerged as the optimal candidates for further analysis and utilization.  
Table 3 presents the wavelengths selected by the GA in the leaf spectra and stem spectra. There were 28 and 25 selected wavelengths in the leaf spectra and stem spectra, respectively.  
Figure 5 shows the important values of the GA-selected wavelengths, evaluated by using SS, RF, and ANOVA, respectively. The GA-selected wavelengths are displayed in descending order of importance, and the important values are scaled between 0 and 1.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Spectra** & **Raw** & **SG** & **SNV** & **MSC** & **SG + SNV** & **SG + MSC** \\ \hline
**Leaf** & 87.7 & **96.4** & 93.1 & 92.5 & 92.8 & 94.5 \\
**Stem** & 88.1 & **96.9** & 94.8 & 94.6 & 90.1 & 91.1 \\ \hline \hline \end{tabular} Abbreviations: LDA, linear discriminant analysis; SG, Savitzky–Golay; SNV, standard normal variation; MSC, multiple scattering correction.  
\end{table}
Table 2: Classification accuracy of the LDA model in the test set using different spectral pretreatment methods (%).  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Spectra** & **Selected Wavelengths (nm)** \\ \hline
**Leaf** & 500, 577, 642, 655, 662, 687, 689, 691, 692, 741, 813, 815, \\
**Leaf** & 817, 821, 825, 832, 845, 1400, 1406, 1416, 1434, 1728, 2016, \\  & 2041, 2262, 2276, 2277, 2479 \\ \hline \hline \end{tabular}
\begin{tabular}{c c} \hline
**Stem** & 723, 794, 810, 811, 813, 824, 827, 834, 842, 1687, 1716, 1717, \\
1726, 1750, 1756, 1757, 1776, 1807, 1812, 1819, 1904, 1969, \\
1990, 2390, 2423 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Wavelengths selected by using genetic algorithm.  
In Figure 4(a), we used the randomized lasso method to subsample the training data with a 0.75 ratio 200 times. Then, the coefficients of these unimportant wavelengths were compressed to zero by the lasso, achieving both accurate parameter estimation and wavelength selection. Finally, we calculated the frequency of each wavelength that was considered significant in the 200 selections. As a result, the importance of each GA-selected wavelength could be evaluated with its frequency.  
For Figure 4(b), the order of the wavelengths selected by the GA was randomly shuffled and sent to the RF classifier to evaluate their importance, which was repeated 20 times. In the end, the importance of each wavelength was calculated as the mean of the 20 values.  
For Figure 4(c), we calculated the F-value of each wavelength within the organic and non-organic groups; then, it was used to gauge the importance of each GA-selected wavelength in the experiment.