# Application of Near Infrared Hyperspectral Imaging Technology in Purity Detection of Hybrid Maize
## 3 Results and Discussion
### Model Accuracy Evaluation  
The identification accuracy of the classification model is often evaluated by factors such as the overall classification accuracy, Kappa coefficient, misclassification error, and omission error [40]. The results are shown in Tables 5-7.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Recognition Algorithm** & **2490** & **2780** & **GD5** & **XX8** & **XY335** \\ \hline PLS-DA & 21.43 & 0 & 13.79 & 18.03 & 33.33 \\ KNN & 7.41 & 18.18 & 31.25 & 6.12 & 0 \\ NB & 0 & 9.09 & 0 & 0 \\ RF & 19.355 & 5.66 & 0 & 0 & 0 \\ SVM (Linear) & 0 & 8 & 2.04 & 5.77 & 0 \\ SVM (Polynomial) & 0 & 4 & 0 & 3.85 & 0 \\ SVM (RBF) & 4 & 11.77 & 6 & 5.88 & 0 \\ SVM (Sigmoid) & 8.7 & 16.67 & 13.73 & 10.2 & 8 \\ \hline \hline \end{tabular}
\end{table}
Table 6: The misclassification error.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & & \multicolumn{2}{c}{**Modeling Set**} & \multicolumn{2}{c}{**Prediction Set**} \\ \cline{3-6}
**Recognition Algorithm** & **Parameter** & **Identification** & **Overall** & **Identification** & **Overall** \\  & & **Number** & **Accuracy/\%** & **Number** & **Accuracy/\%** \\ \hline PLS-DA & n\_components = 8 & 413 & 82.6 & 202 & 80.8 \\ KNN & n\_neighbors = 4 & 455 & 91 & 217 & 86.8 \\ NB & auto & 486 & 97.2 & 245 & 98 \\ RF & ntree = 35 & 491 & 98.2 & 235 & 94 \\ SVM (Linear) & C = 1 & 490 & 98 & 248 & 99.2 \\ SVM (Polynomial) & degree = 3 & 500 & 100 & 250 & 100 \\ SVM (RBF) & C = 10 & 489 & 97.8 & 246 & 98.4 \\ SVM (Sigmoid) & g = 0.001 & 486 & 87.2 & 221 & 88.4 \\ SVM (Sigmoid) & auto & 436 & 87.2 & 221 & 88.4 \\ \hline \hline \end{tabular}
\end{table}
Table 4: The total recognition results of diffident models based on feature wavelengths.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & & \multicolumn{2}{c}{**Modeling Set**} & \multicolumn{2}{c}{**Prediction Set**} \\ \cline{3-6}
**Recognition Algorithm** & **Parameter** & **Identification** & **Overall** & **Identification** & **Overall** \\  & & **Number** & **Accuracy/\%** & **Number** & **Accuracy/\%** \\ \hline PLS-DA & n\_components = 10 & 440 & 88 & 211 & 84.4 \\ KNN & n\_neighbors = 4 & 490 & 98 & 244 & 97.6 \\ NB & auto & 491 & 98.2 & 250 & 100 \\ RF & ntree = 25 & 494 & 98.8 & 241 & 96.4 \\ SVM (Linear) & C = 1 & 490 & 98 & 248 & 99.2 \\ SVM (Polynomial) & degree = 3 & 500 & 100 & 250 & 100 \\ SVM (RBF) & C = 84.45 & 489 & 97.8 & 246 & 98.4 \\ SVM (RBF) & g = 0.001 & 489 & 97.8 & 246 & 98.4 \\ SVM (Sigmoid) & auto & 448 & 89.6 & 228 & 91.2 \\ \hline \hline \end{tabular}
\end{table}
Table 3: The total recognition results of diffident models based on full-spectrum.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Recognition Algorithm** & **Overall Accuracy/\%** & **Kappa Coefficient** \\ \hline PLS-DA & 81.2 & 0.41 \\ KNN & 86.8 & 0.59 \\ NB & 98 & 0.94 \\ RF & 94 & 0.81 \\ SVM (Linear) & 96.8 & 0.9 \\ SVM (Polynomial) & 98.4 & 0.95 \\ SVM (RBF) & 94.4 & 0.83 \\ SVM (Sigmoid) & 88.4 & 0.64 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Overall classification accuracy and Kappa coefficient.  
The data in Table 5 shows that the SVM model based on polynomial kernel functions has the highest overall accuracy, which reaches 98.4%. The data in Tables 6 and 7 show that X Y335 maize has the smallest wrong classification error and the least easy to be misclassified in different models. The reason is that the parents of XY335 are different from other varieties and have quite different genes, which can be well identified in the discriminant analysis. The polynomial kernel function establishes minimal model misclassification errors and powder leakage errors. It can be further seen that the SVM model establishment of the polynomial kernel function has a high accuracy for the maize variety classification, which can realize the purity identification of maize kernels.