## 3 Results and Discussion
### Spectral Analysis
#### 3.2.2 Classification Based on Data of the Mixture of Maize Kernels Orientated Germ Up and Down  
For practical application, it was expected that performance for classification was similar regardless of the orientation of kernels. Data of kernels of the two Petri dishes were analyzed and discussed. A total of 288 samples made up the data set, with 36 from each of the eight treatments. In addition, 192 of 288 kernels were selected as the calibration set, while the other 96 kernels were used as the validation set. Results of the data analyzed with the same chemometric algorithms were shown in Table 3. Similar to Table 1, NMZ showed the worst performance among the pretreatment methods and MAS combined with SNV had the highest accuracies. Compared with Table 1, with the same pretreatment methods, the results were worse in Table 3 than that in Table 1, which indicated that germ orientation does have an influence on the classification performance. As for maize kernels with different characters on two sides, i.e., the germ and endosperm side, published literature showed oil-rich germs are colonized by aflatoxin-producing fungi before endosperm tissue [42; 43], which makes a distribution difference in the depth of fungi. Moreover, major information in reflectance spectra originate from the surface and several millimeters below the surface of the side facing the camera. Hence, data of kernels with germ up performed more effectively than that of germ down for detecting early growth of fungi. Despite this, accuracies of the best results were 95.83% and 84.38% for calibration and validation, respectively. Both were above 84%, which was also significant for application. The corresponding confusion matrix with characteristics (i.e., sensitivity, specificity, and overall accuracy) was shown in Table 4. The results were similar to Table 2, and slightly worse. Variance percentages of each of the first six PCs used for the best classification model were listed in Table 5. All of them contributed 99.40% of the total variation information. Then, in order to select the characteristic wavelengths, loading line plot of the first six PCs were analysed. According to [PERSON] et al. [44], PC\({}_{1}\) to PC\({}_{3}\) reflected the variation due to the effect of grain topography, such as \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline \multirow{2}{*}{**Actual Result**} & \multicolumn{8}{c}{**Predicting Result**} \\ \cline{2-9}  & \multicolumn{4}{c}{**Calibration**} & \multicolumn{4}{c}{**Validation**} \\ \cline{2-9}  & **DC** & **D\({}_{\textbf{1-2}}\)** & **D\({}_{\textbf{3-4}}\)** & **D\({}_{\textbf{5-7}}\)** & **DC** & **D\({}_{\textbf{1-2}}\)** & **D\({}_{\textbf{3-4}}\)** & **D\({}_{\textbf{5-7}}\)** \\ \hline DC & 9 & 0 & 2 & 0 & 4 & 0 & 3 & 0 \\ D\({}_{\text{1-2}}\) & 0 & 22 & 0 & 0 & 0 & 14 & 0 & 0 \\ D\({}_{\text{3-4}}\) & 0 & 0 & 21 & 0 & 0 & 0 & 14 & 1 \\ D\({}_{\text{5-7}}\) & 0 & 0 & 0 & 42 & 0 & 0 & 0 & 12 \\ \hline Precision (\%) & 100.00 & 100.00 & 91.30 & 100.00 & 100.00 & 100.00 & 82.35 & 92.31 \\ Sensitivity (\%) & 81.82 & 100.00 & 100.00 & 100.00 & 57.14 & 100.00 & 93.33 & 100.00 \\ Specificity (\%) & 100.00 & 100.00 & 97.33 & 100.00 & 100.00 & 100.00 & 90.91 & 97.22 \\ Overall accuracy (\%) & \multicolumn{4}{c}{97.92} & \multicolumn{4}{c}{91.67} \\ \hline \hline \multicolumn{9}{l}{D\({}_{\text{1-2: the group consisted of D}_{\text{1}}\) and D\({}_{\text{2}}\); D\({}_{\text{3-4:}}\) the group consisted of D\({}_{\text{3}}\) and D\({}_{\text{4}}\); D\({}_{\text{5-7:}}\) the group consisted of D\({}_{\text{5}}\), D\({}_{\text{6}}\) and D\({}_{\text{7}}\).} \\ \end{tabular}
\end{table} 
Table 2: Confusion matrix of calibration and validation set of the best model based on kernels orientated with germ up.