## 3 Results
### Classification Results of Different Models  
Discriminant models were built by KNN, SVM and CNN models. To evaluate the effectiveness of these models, training sets with different number of samples were used. Training sets with 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1500, 2000, 2500 and 3000 samples selected from the total training samples of each rice seed variety were used to build discriminant models, and the test set for above-mentioned models were all the same (2664, 2394, 1933, and 1916 rice seeds of Xiushui 134, Zhejiang 99, Zhongjiazao 17 and Zhongzao 39) for different number of training samples. The overall results are presented in Figure 4.  
As shown in Figure 4, the classification accuracy of the training and test set of different models increased with the increase in the number of samples in the training set. Some fluctuations could be observed from the classification accuracy of the training set. When the number of samples came to a critical value, the increase rate of classification accuracy was small. For different models, the critical values were different. The models using 3000 training samples performed best since large training set is expected to contain a more extensive set of different types of feature combinations and feature values than small training sets. Figure 3: Average spectra of 4 varieties of rice seeds in two different spectral ranges, (**a**) Spectral range 1: 441–948 nm, (**b**) Spectral range 2: 975–1646 nm; the corresponding average spectra preprocessed by second derivative, (**c**) Spectral range 1, (**d**) Spectral range 2. It can be seen in Figure 5 that the KNN model performs much worse than the other two models, and the test accuracy of models using Spectral range 1 and 2 are both lower than 60%. For KNN, SVM and CNN models, the classification accuracy of the training and test sets increased along with the increase of the training samples, although some fluctuations existed in the classification accuracy of the training sets (especially KNN and SVM models). KNN models using different number of training samples obtained relatively worse results than the corresponding SVM and CNN models. For SVM and CNN models, the classification results were close when the same number of samples was used. With  
Figure 4: Results of discriminant models using different number of samples (100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1500, 2000, 2500 and 3000) in the training set. **(a)** Results of KNN models using different number of samples for Spectral range 1; **(b)** Results of KNN models using different number of samples for Spectral range 2; **(c)** Results of SVM models using different number of samples for Spectral range 2; **(e)** Results of CNN models using different number of samples for Spectral range 2; **(e)** Results of CNN models using different number of samples for Spectral range 1; **(f)** Results of CNN models using different number of samples for Spectral range 2.  
the increase of training samples, the performances of CNN models were better than the corresponding SVM models. The CNN model using 3000 samples in the Spectral range 2 obtained the best results. The classification accuracy of the training and test set was 89.6% and 87.0%, respectively. For all methods, models trained with reflectance values in Spectral range 2 performed better than models trained with reflectance values in Spectral range 1. As seen from Figure 3, no typical spectral peaks or minimums could be found from the average spectra in the Spectra range 1, while obvious spectral peaks or minimums were found from the average spectra in the Spectra range 2. The differences in second derivative spectra in the Spectral range 1 were mainly attributed to the color variations of the rice husk, and the differences in second derivative spectra in the Spectral range 2 were mainly attributed to the chemical compositions of rice seeds. This might be the reason why models in Spectral range 1 performed a little worse than those in the Spectral range 2.