# Variety Identification of Chinese Walnuts Using Hyperspectral Imaging Combined with Chemometrics
## 3 Results and Discussion
### Exploratory Analysis  
PCA was applied to visualize the spectral similarities and differences of samples of different varieties. The PCA results based on raw spectra showed that the first two PCs  
Figure 1: The average reflectance spectral curves of Chinese walnut samples of Ningguo and Lin’an varieties with standard deviation (SD).  
accounted for a total of 98.19% of the cumulative spectral variances (86.16% for PC\({}_{1}\) and 12.03% for PC\({}_{2}\)). These two PCs together showed great potential in differentiating the two Chinese walnut varieties, so only PC\({}_{1}\) and PC\({}_{2}\) were retained in this study. The total 400 samples are plotted in Figure 2 based on their first two PC scores. Figure 2a shows the score plot of PC\({}_{1}\) vs. PC\({}_{2}\) in the PC space, this preliminary evaluation indicated that there was a separable observation of samples of the two different varieties. Ellipses were drawn herein to denote their covered regions to intuitively see the distribution. Although there was little overlap, the samples in these two groups tended to gather, respectively. That is, Ningguo samples tended to have positive PC\({}_{2}\) values, while Lin'an samples had negative PC\({}_{2}\) values. PC\({}_{1}\) and PC\({}_{2}\) loading lines are further shown in Figure 2b. Peaks and valleys with high absolute coefficients were deemed to be effective. This comprehensive analysis showed that wavelengths centered at 676 nm, 760 nm, and 980 nm can be selected as effective wavelengths. The wavelengths of 676 nm and 980 nm were consistent with the ones selected in spectral analysis in Section 3.1. The band at 760 nm was related to the third stretching O-H overtone of water [41].  
As PC\({}_{1}\) and PC\({}_{2}\) were able to represent a total of 98.19% spectral variations, the corresponding score images were introduced to visualize and identify the inherent rules in spectra. Figure 3 shows the first two PC score images that transformed from calibrated hyperspectral images ranging from 400 to 1000 nm. Pixels were given different PC score values and displayed in different colors. It could be seen that there was no obvious difference between Ningguo and Lin'an walnuts in PC\({}_{1}\) score images. That is, the PC\({}_{1}\) score image can hardly be used for Chinese walnut varieties classification. This observation is consistent with the results presented in spectra PCA in Figure 2a. As is also can be observed that samples of these two varieties presented slightly different colors in PC\({}_{2}\) score image. The PCA and score images have demonstrated the potential separability between Ningguo and Lin'an Chinese walnuts. A high misclassification rate was also observed due to the similar spectral curves, and more accurate identification methods were still required.  
Figure 2: Spectra PCA for Chinese walnut samples of different varieties. (**a**) Score plot of PC\({}_{1}\) against PC\({}_{2}\), (**b**) PC\({}_{1}\) and PC\({}_{2}\) loading lines. PCA: principal component analysis; PC\({}_{1}\): first principal component; PC\({}_{2}\): second principal component.