# Rapid Classification of Wheat Grain Varieties Using Hyperspectral Imaging and Chemometrics
## 3 Results and Discussion
### Extraction of Feature Wavelengths  
To reduce the highly-correlated spectral information and facilitate the speed of modeling, the feature wavelengths were selected from raw full wavelengths while using SPA, PCA loading, and RF algorithms. After selection of feature wavelengths, the number of variables decreased from 200 to 10, 36, and 50, respectively. The specific wavelengths identified by the three variable selection algorithms were exhibited in Table 3.  
Unlike PCA dimensional reduction, PCA loading should select as many PCs as possible, so as to comprehensively extract feature wavelengths. Accounting for a large proportion of contribution rate up to 99.97% totally (90.092%, 9.405%, 0.334%, 0.074%, 0.037%, 0.028%, respectively), the first six PCs could reflect spectral information comprehensively and completely. Hence, they were loaded to extract feature wavelengths and their loading curves are shown in Figure 4. It was noticed that the trend of PC1 curve was same as the original spectral curve of wheat seeds, which was different from other PCs. The wavelengths at the crests and troughs of the loading curves were selected as the key priority of feature wavelengths, as shown in Figure 4[37]. \begin{table}
\begin{tabular}{c c c c c c c c c c c c} \hline \hline \multirow{2}{*}{**Var.**} & \multicolumn{8}{c}{**Calibration Set**} & \multicolumn{8}{c}{**Prediction Set**} \\ \cline{2-13}  & **1** & **2** & **3** & **4** & **5** & **Acc./\%** & **1** & **2** & **3** & **4** & **5** & **Acc./\%** \\ \hline
1 & 5831 & 12 & 64 & 3 & 0 & 98.66 & 1432 & 8 & 36 & 1 & 1 & 96.89 \\
2 & 17 & 3906 & 735 & 34 & 300 & 78.25 & 11 & 894 & 250 & 10 & 83 & 71.63 \\
3 & 179 & 632 & 4258 & 21 & 25 & 83.25 & 78 & 224 & 950 & 15 & 12 & 74.28 \\
4 & 0 & 15 & 32 & 4915 & 98 & 97.13 & 0 & 12 & 16 & 1190 & 48 & 94.00 \\
5 & 0 & 89 & 14 & 62 & 5551 & 97.11 & 1 & 61 & 17 & 37 & 1314 & 91.89 \\ \hline Total & & & & & 91.30 & & & & & & & & 86.26 \\ \hline \hline \end{tabular} Note: Var. means different varieties of wheat samples. Acc. means classification accuracy of ELM model.  
\end{table} 
Table 2: The detailed discrimination results of five wheat varieties in extreme learning machine (ELM) model. \begin{table}
\begin{tabular}{c c} \hline \hline
**Method** & **Num.** \\ \hline SPA & 10 & 995, 1119, 1301, 1405, 1442, 1475, 1618, 1324, 1227, 1540 \\ \hline PCA loading & 36 & 995.15, 1005.22, 1025.37, 1048.88, 1062.31, 1095.92, 1102.64, 1112.72, 712.81, 1129.54, \\  & 1173.26, 1179.99, 1200.19, 1203.55, 1227.12, 1281.01, 1301.23, 1304.60, 1311.35, 1321.46, \\  & 1372.05, 1378.80, 1395.67, 1405.79, 1412.54, 1439.55, 1446.31, 1469.95, 1473.33, 1483.46, \\  & 1551.07, 1561.21, 1574.74, 1584.98, 1622.12, 1628.89 \\ \hline RF & 975.01, 1018.65, 1065.67, 1069.03, 1072.39, 1092.5601, 1106, 1119.45, 1122.81, 1129.54, \\  & 1136.26, 1156.4399, 1159.81, 1166.54, 1176.63, 1190.09, 1193.46, 1203.55, 1217.02, 1227.12, \\  & 1230.49, 1254.06, 1260.8, 1267.54, 1277.64, 1281.01, 1314.72, 1331.57, 1338.32, 1345.06, \\  & 1382.17, 1385.54, 1395.67, 1402.42, 1419.29, 1439.55, 1453.06, 1459.8101, 1463.19, 1469.95, \\  & 1473.33, 1490.22, 1517.26, 1524.02, 1557.83, 1584.89, 1632.27, 1639.04, 1642.43, 1645.82 \\ \hline \end{tabular}
\end{table} 
Table 3: The feature wavelengths extracted by successive projections algorithm (SPA), Principal component analysis (PCA), loading, and random frog (RF) based on raw spectra. The SPA and RF algorithms were implemented and their extracted wavelengths are displayed in Table 3. Before carrying out the two corresponding algorithms, the number of selected variables was set with min-value 5 and max-value 30 for SPA, and the maximal latent variables for cross-validation were set as 20 for RF. Subsequently, feature wavelengths through them are displayed visually in Figure 5.  
Among all of the selected characteristic wavelengths, the bands between 973 nm and 1020 nm were attributed to the second overtone of N-H stretching.