## 3 Results and Discussion
### Prediction of Ipomeamarone Content and Total Colony Count Using E-Nose Combined with Chemometrics  
E-nose data for _C. fimbriata_-infected sweetpotatoes at 0 h, 48 h, 64 h, and 72 h were used for prediction. Three models were used to predict: KNN, PLS, and PCR. A model that had higher R\({}^{2}\) and RPD but lower RMSE (both for calibration and prediction sets) had better performance [52]. When RPD > 3.0, the model had excellent calibrating robustness and high predictive accuracy, which could be applied for actual value prediction [53]. The prediction model parameters of ipomeamarone were set as follows. When the number of K neighbours of KNN was 2, the latent variable (LV) of PLS was 7, and the number of PCs of PCR was 10, the cross-validation sets of the three models had the highest R\({}_{\text{cv}}\)\({}^{2}\) and the lowest RMSE of cross-validation (RMSECV). Therefore, these parameters were used to train the calibration sets and then the prediction sets were used to test models. The prediction results are shown in Figure 10(A1-C1) and Table 4, in which the contents of ipomeamarone are presented as \(\upmu\)g g\({}^{-1}\) FW. The R\({}_{\text{P}}\)\({}^{2}\) of KNN (R\({}_{\text{P}}\)\({}^{2}\) = 0.932) was higher than that of PCR and PLS. The RMSEP of KNN (RMSEP = 1.410 \(\upmu\)g g\({}^{-1}\) FW) was lower than that of PCR and PLS. The RPD of KNN (RPD = 3.852) was also higher than that of PCR and PLS, indicating that KNN had the best highest predictive accuracy, followed by PCR and PLS. The R\({}_{\text{P}}\)\({}^{2}\) of PCR was higher than that of PLS, the RMSEP was lower than that of PLS, and the RPD was higher than that of PLS, indicating that the prediction performance of PCR was better than PLS. In summary, the best model for the prediction of ipomeamarone was KNN, followed by PCR and finally PLS. The prediction model parameters for the total colony count were set as follows. When the number of K neighbours of KNN was 2, the LV of PLS was 8, and the PCs of PCR was 10, the cross-validation sets of three models had the highest R\({}_{\text{cv}}\)\({}^{2}\) and the lowest RMSECV. The prediction results are shown in Figure 10(A1-C1) and Table 5, in which the total colony count is presented as log (CFU g\({}^{-1}\)) (the log was base 10). The R\({}_{\text{P}}\)\({}^{2}\) of KNN (R\({}_{\text{P}}\)\({}^{2}\) = 0.909) was higher than that of PLS and PCR. The RMSEP of KNN (RMSEP = 0.110 log (CFU g\({}^{-1}\))) was lower than that of PLS and PCR. Meanwhile, the RPD of KNN (RPD = 3.306) was higher than that of PLS and PCR, indicating that KNN had the highest predictive accuracy, followed by PLS and PCR. The R\({}_{\text{P}}\)\({}^{2}\) of PLS was higher than that of PCR, the RMSEP was lower than that of PCR, and the RPD was higher than that of PCR, indicating that the prediction performance of PLS was better than that of PCR. To sum up, the best model for the prediction of total colony count was KNN, followed by PLS and finally PCR. It can be seen from the above that KNN has the best prediction effect on ipomeamarone content and total colony count. In regression by KNN, the input consists of the closest training examples in the data set, and the output is the property value for the object--in other words, the average of the values of K-nearest neighbours [54]. Therefore, distance and K neighbours are the important factor affecting the prediction results of KNN. In this study, Euclidean distance and optimized K neighbours used in the model achieved a good effect in prediction. This also illustrates the feasibility of KNN for predicting sweetpotato toxins and pathogen growth.