## 3 Result and Discussion
### Identification of Fungal Growth Days by Support Vector Machine (SVM)
#### 3.4.2 Optimal Wavelengths SVM Models  
Dimensionality reduction is an important step in spectral analysis, and selected wavelengths instead of full wavelength would be beneficial for developing the simplified and also practical multispectral detection model. CARS was used to select optimal wavelengths in this study. As a result, nine (402, 442, 487, 502, 524, 553, 646, 671, and 760 nm) wavelengths were identified as optimal wavelengths for _A. flavus_ with different incubation times, and seven (461, 538, 542, 742, 753, 756, and 919 nm) optimal wavelengths for _A. parasiticus_. The spectra of selected optimal wavelengths were then utilized to replace the full range spectra for the construction of the SVM models. The overall classification results are 91.67%, 83.33%, and 91.67% for _A. flavus_ in calibration set, validation set, and cross validation; and 100%, 98.15%, and 100% for _A. parasiticus_. It was shown that the original models that used the spectra of full wavelengths were not significantly better than the optimized models that used the spectra of the selected optimal wavelengths. The optimal wavelengths SVM models only used several bands, which greatly reduced the calculation.  
In earlier studies about using several optimal wavelengths to establish models, [PERSON] et al. separated five fungi by using only three bands [18], while [PERSON] et al. fitted growth curves for different kinds of fungi by characteristic wavelength in region of visible spectrum [7]. The authors pointed out that the characteristic wavelengths in visible region had good performance, because these wavelengths were associated with the variations of fungal color and texture during culture time. As shown in Figure 8, some of the selected wavelengths by CARS were also obvious peaks on the loading line plot. It also proves that the wavelengths selected by CARS are important wavelengths.  
Prediction images were created to mark fungi with different incubation times in different colors. The prediction images were obtained by applying the optimal wavelengths SVM model to every pixel of the fungal hyperspectral image, respectively [17]. The prediction images of _A. flavus_ and _A. parasiticus_ were shown in Figure 9a,b, respectively. In the prediction maps, pixels that have the same predicted values have the same color, while black pixels in the Petri dish were not correctly classified. It should be noted that the growth of fungi in Petri dish was non-uniform. Thus, hyperspectral image of fungi incubated for different days still contains many similar pixels. This may cause some pixels to be wrongfully classified. Due to the similarity of _A. flavus_ on day 3 and day 4, there was a serious misjudgment between day 3 and day 4. The misjudgment between day 2 and 3 for _A. parasiticus_ may be caused by the same problem. In this work, in which 50% of the total number of pixels for an object was recognized as class members, the entire object was classified as a member too. After processing using this method, the identification accuracies reached 100% in the prediction image for the two fungi.  
Figure 8: (**a**) Loading line plot of _A. flavus_ and (**b**) loading line plot of _A. parasiticus_.