## 4 Discussion  
Machine learning methods play essential roles in interpreting spectral data for different spectroscopy techniques and spectral imaging techniques. Deep learning is now a hot topic in AI, and convolutional neural networks (CNNs) are one of the most popular deep learning models. Generally, deep learning methods were used to analyze two-dimensional images. In this study, CNN was applied to one-dimensional spectra, and the CNN models obtained good performances. When compared with KNN and SVM models, CNN model performed better. The results of this study indicate that CNN could be used to handle spectral data effectively, which brings new alternatives for spectral data analysis. [PERSON] et al. (2017) proposed a CNN architecture for vibrational spectroscopic data analysis, and partial least squares-discriminant analysis (PLS-DA), logistic regression and KNN were used for comparison. The results showed that CNN model yielded satisfactory results. In most cases, CNN performed best, and in some other cases, CNN was not the best model ([PERSON] et al., 2017). [PERSON] et al. (2017) proposed a CNN architecture to classify preprocessed and unpreprocessed Raman spectra. CNN models obtained the best performances when compared with KNN, SVM, gradient boosting, random forest and correlation ([PERSON] et al., 2017). These researches together with the results in this manuscript indicated that CNN could be used to deal with one-dimensional spectral data. As can be seen from the confusion matrices, models performed better in distinguishing two rice varieties of different types (e.g., rice 1 and rice 3) than in distinguishing two rice varieties of the same type (e.g., rice 1 and rice 2). Moreover, models of Spectral range 1 performed better in classification of rice varieties 3 and 4 (both indica rice) than Spectral range 2, while models of Spectral range 2 performed better in classification of rice varieties 1 and 2 (both japonica rice) than Spectral range 1. This indicates a potential model improvement by combining two spectral ranges. However, hyperspectral images of the two spectral ranges were scanned by two different hyperspectral cameras. To combine these two spectral ranges, works should be done to match rice seeds in two corresponding hyperspectral images. This might be time-consuming in practical use. In this study, only 4 varieties of rice seeds were used. Since CNNs have achieved high performance in classification of thousands of image classes, classification of more rice seed varieties using a CNN might also be possible. But as a cost, large amounts of samples should be collected for each rice seed variety. More varieties of rice seeds and even more crop species should be studied in future research. The influence of the number of training samples was also studied. Generally, performance of machine learning methods increases with the number of training samples. The lack of training samples limits the test performance of trained models. While test performance increase with the number of training samples, the improvement might not be significant after a certain point due to redundancy of information contained in training samples. Moreover, the sample collection procedure could be time-consuming. Thus, it is important to balance performance and cost of models. As shown in Figure 5, overall, the model performance improved with the number of training samples for KNN,