## 3 Results and Discussion
### Discussion  
Analyzing the prediction results obtained by using different wavelength selection methods (SPA, UVE, GA, and BFWA), BFWA had better prediction results than that obtained by the other two traditional wavelength selection methods (SPA and UVE). The accuracy of prediction results obtained by the GA method was slightly worse than the BFWA method. The reason for these differences is due to the fact that GA and BFWA belong to swarm intelligence algorithms, i.e., both algorithms generate an initial population randomly in the solution space. When the algorithms search for the optimal solution in the global solution space with continuous iterations, the search is more concentrated on high performance, which is conducive to finding the optimal solution quickly. This feature of swarm intelligence algorithms is more suitable for wavelength selection of hyperspectral images than traditional methods. There are some similarities among swarm intelligence algorithms in the iteration process, which may lead to the results of prediction models obtained by the BFWA and GA methods being close to each other. Real-time results are another important consideration in the development of online detection of sample moisture content systems. When the same prediction set was used to predict the moisture content, the values of average calculation time were about 0.531 and 0.296 seconds by using full wavelengths and 12 optimal wavelengths, respectively. It is noteworthy that some parameters need to be set in this algorithm, which have certain impacts on the wavelength selection. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Prediction Set** & **Method** & \begin{tabular}{c} **Mean Value of** \\ \(\mathbf{R_{p}}\)1  **(\%)** \\ \end{tabular} & \begin{tabular}{c} **Std \({}^{\text{c}}\) of** \(\mathbf{R_{p}}\)1  **(\%)** \\ \end{tabular} \\ \hline Prediction set 1 & \begin{tabular}{c} GA \\ BFWA \\ \end{tabular} & 0.965 & 5.440 & 0.004 & 0.298 \\ \cline{2-6}  & BFWA & 0.970 & 5.127 & 0.003 & 0.205 \\ \hline Prediction set 2 & \begin{tabular}{c} GA \\ BFWA \\ \end{tabular} & 0.948 & 5.987 & 0.002 & 0.122 \\ \cline{2-6}  & BFWA & 0.949 & 5.913 & 0.003 & 0.161 \\ \hline Prediction set 3 & \begin{tabular}{c} GA \\ BFWA \\ \end{tabular} & 0.951 & 5.546 & 0.005 & 0.242 \\ \cline{2-6}  & BFWA & 0.962 & 4.949 & 0.003 & 0.203 \\ \hline Prediction set 4 & \begin{tabular}{c} GA \\ BFWA \\ \end{tabular} & 0.968 & 5.364 & 0.002 & 0.171 \\ \cline{2-6}  & BFWA & 0.976 & 4.704 & 0.003 & 0.250 \\ \hline Prediction set 5 & \begin{tabular}{c} GA \\ BFWA \\ \end{tabular} & 0.960 & 5.666 & 0.003 & 0.239 \\ \cline{2-6}  & BFWA & 0.965 & 5.274 & 0.002 & 0.159 \\ \hline Prediction set 6 & \begin{tabular}{c} GA \\ BFWA \\ \end{tabular} & 0.960 & 5.536 & 0.004 & 0.233 \\ \cline{2-6}  & BFWA & 0.964 & 5.122 & 0.002 & 0.183 \\ \hline Prediction set 7 & \begin{tabular}{c} GA \\ BFWA \\ \end{tabular} & 0.970 & 5.211 & 0.003 & 0.203 \\ \cline{2-6}  & BFWA & 0.972 & 4.972 & 0.002 & 0.136 \\ \hline Prediction set 8 & \begin{tabular}{c} GA \\ BFWA \\ \end{tabular} & 0.962 & 5.388 & 0.001 & 0.057 \\ \cline{2-6}  & BFWA & 0.972 & 4.782 & 0.001 & 0.038 \\ \hline Prediction set 9 & \
\begin{tabular}{c} GA \\ BFWA \\ \end{tabular} & 0.970 & 4.884 & 0.003 & 0.237 \\ \cline{2-6}  & BFWA & 0.973 & 4.641 & 0.001 & 0.105 \\ \hline Prediction set 10 &
\begin{tabular}{c} GA \\ BFWA \\ \end{tabular} & 0.961 & 5.374 & 0.004 & 0.227 \\ \cline{2-6}  & BFWA & 0.966 & 5.254 & 0.001 & 0.107 \\ \hline
**Average** &
\begin{tabular}{c} GA \\ BFWA \\ \end{tabular} & 0.962 & 5.439 & 0.003 & 0.203 \\ \cline{2-6}  & BFWA & 0.967 & 5.074 & 0.002 & 0.155 \\ \hline \hline \end{tabular}  
* \(\mathbf{R_{p}}\): correlation coefficient of prediction set. \({}^{\text{b}}\) RMSEP: root mean square error of prediction set. \({}^{\text{c}}\) **Std**: standard deviation of data.  
\end{table} 
Table 2: Stability results of the PLSR model obtained by the two methods with 12 optimal wavelengths selected.