## 2 Materials and Methods
### Data Processing and Analysis  
All the Raman spectral data were smoothed via Savitzky-Golay filter with polynomial order 3 to remove the system noise. The back-ground noises caused by fluorescence were subtracted via linear-fitted lines based on the same points for each spectrum. Then, each spectrum was normalized by dividing by its own maximum value in the range of 400-1800 cm\({}^{-1}\), providing accurate spectral shapes and better comparison of various Raman bands from different samples. The smoothing, background subtraction and normalization of the spectra were processed with software Origin 9 (Origin Lab, Northampton, MA, USA). Statistical significance for the Raman intensity of the characteristic peaks was evaluated with one-way analysis of variance (ANOVA) with [PERSON]'s test, also using the software Origin 9. \(p\) values less than 0.05, 0.01, 0.001 and 0.0001 were considered statistically significant.  
We proposed PCA-LDA-based SVM, an SVM model based on PCA-LDA dimensionality reduction, to perform classification for the Raman spectral data. PCA and LDA are both important dimensionality-reduction techniques for high-dimensional data. PCA removes the correlation between the eigenvalues corresponding to each wavelength based on the statistical information of data, thus removing redundant information. LDA projects high-resolution, high-dimensional Raman spectral data into the low-dimensional space. The disadvantage of LDA is that it relies heavily on the distribution of data, and it is prone to overfitting. In order to obtain higher classification performance, PCA was realized as a precursor step to LDA classification.  
This two-step process combined the benefits of both PCA and LDA. It can reduce the dimensionality while preserving the discriminatory information. However, after reducing the data to two variables using PCA-LDA, it was still difficult to classify the samples in a potentially nonlinear feature space. LDA alone may not be sufficient to handle complex decision boundaries in this reduced feature space. Therefore, we introduced the higher-order SVM as the classifier. SVM is a powerful machine learning algorithm known for its ability to handle nonlinear classification tasks effectively. By utilizing the kernel trick, SVM can map the reduced two-dimensional feature space into a higher-dimensional space where the samples become linearly separable. This can provide more accurate classification and better generalization of unseen data.  
In addition, we constructed the model without the whitening operation. Whitening is a technique commonly used in data preprocessing to transform data into a form with zero mean and unit variance. It is also known as a de-correlation operation or spherification operation. The goal of the whitening operation is to remove correlation from the data so that there is no linear correlation between the transformed data features and the variance of each feature is equal to 1. This data-preprocessing technique can help improve the performance of certain machine learning algorithms, especially those that are sensitive to correlation between data features. For PCA, to achieve more accurate classification, 95% of the variance information of the original Raman spectral was retained. For LDA, the number of components after projection was set to 2 to weaken the tendency of overfitting. For SVM, we constructed a nonlinear multidimensional support vector classifier, set the penalty term coefficient of the relaxation coefficient to 1, selected Gaussian radial basis as the kernel and set gamma as the inverse of the Raman spectral feature length.  
The training phase consists of three processes: first, redundant information was removed from the Raman spectral data using PCA; second, the LDA was fitted by least squares to project the high-dimensional information into the two-dimensional space; finally, the SVM was trained on the basis of the LDA dimensionality reduction. The steps in the inference process were similar.