## 3 Results
### Impact of Preprocessing Algorithms on Model Performance  
The experimental results shown in Table 6 indicate that preliminary preprocessing of spectral data through interpolation and resampling can significantly enhance the accuracy of classification algorithms. This finding confirms the effectiveness of interpolation and resampling techniques in adjusting data sampling rates and distributions, especially when handling unevenly sampled signals or converting signals between different sampling rates.  
In the deep learning process, models using resampling techniques performed the best. With the original data, the SpectraViT model achieved an accuracy and recall of 98.29%, precision of 98.30%, and an F1 score of 98.30%. This demonstrates that even without any preprocessing, the model performs well, indicating a strong robustness to the raw data.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Method** & **Acc (\%)** & **Recall (\%)** & **Precision (\%)** & **F1 (\%)** \\ \hline Raw & 98.29 & 98.29 & 98.30 & 98.30 \\ \hline \multirow{4}{*}{Resample} & None & 99.24 & 99.25 & 99.06 & 99.23 \\  & NMS & 98.09 & 98.09 & 98.12 & 98.10 \\ \cline{1-1}  & SS & 98.43 & 98.43 & 98.48 & 98.45 \\ \cline{1-1}  & SG & 98.57 & 98.57 & 98.57 & 98.37 \\ \cline{1-1}  & MSC & 98.64 & 98.64 & 98.65 & 98.64 \\ \hline \hline \end{tabular}
\end{table}
Table 6: The effect of different preprocessing methods on SpectraViT.  
\begin{table}
\begin{tabular}{l c c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multirow{2}{*}{**Params (M)**} & \multirow{2}{*}{**FLOPs (G)**} & \multirow{2}{*}{**Val\_Acc (\%)**} & \multicolumn{4}{c}{**Test Datasets**} \\ \cline{6-8}  & & & & **Acc (\%)** & **Recall (\%)** & **Precision (\%)** & **F1 (\%)** \\ \hline SpectraViT & 0.852 & 0.009 & 99.31 & 99.24 & 99.25 & 99.06 & 99.23 \\ AlexNet & 8.291 & 0.022 & 98.77 & 98.02 & 98.02 & 98.09 & 98.05 \\ DeepSpectra & 207.398 & 0.213 & 98.43 & 98.36 & 98.36 & 98.42 & 98.38 \\ SpectraTr & 16.030 & 2.101 & 97.82 & 96.93 & 96.93 & 97.06 & 96.72 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Performance comparison of SpectraViT and other models.  
When the raw spectral data were resampled, model performance improved significantly, with accuracy reaching 99.24%, recall of 99.25%, precision of 99.06%, and an F1 score of 99.23%. This suggests that resampling preserves and expresses the most useful initial features of the data.  
Further experiments explored the effects of different preprocessing algorithms, including normalization (NMS), standard score transformation (SS), Savitzky-Golay smoothing (SG), and multiplicative scatter correction (MSC), applied after interpolation and resampling. The results showed a slight decrease in model performance with these preprocessing methods. This indicates that these preprocessing methods may lead to some loss of feature information, reducing the model's classification performance. However, our model still demonstrated strong nonlinear fitting and adaptive learning capabilities, effectively extracting key features from the data. Additionally, our model is capable of achieving good spectral recognition without extensive preprocessing.