## 2 Materials and Methods
### Variable Selection
#### 2.3.2 Variable Selection Algorithms  
Different categories of variable selection algorithms, including PCC, VIP, UVE, MWPLS, GA, and RF, were used, and they can fully represent the variable selection algorithms currently in use. PCC is straightforward and easy to understand. It calculates the correlation between the intensity vector, \(x\), which corresponds to each spectral variable, and the concentration vector, \(y\), of the analyzed component to obtain the correlation coefficient, \(r\). Then, based on a given threshold, spectral variables with a correlation coefficient greater than this threshold are selected for model development [36]. The correlation coefficients for different components can vary significantly, and threshold values are not uniformly determined. In this study, the correlation coefficients were arranged in descending order, and spectral variables were selected according to a user-refined number. The VIP method creates a weighted sum of the squares of the PLS model weights which leverages the amount of explained variance in each PLS latent variable [37]. In practice, this method produces a set of VIP scores for each Raman shift, reflecting its contribution to the variance in the concentration of each analyzed component. Generally, a variable is considered important if its VIP score is greater than 1.0. In this study, we selected a defined number of variables with VIP scores in descending order, regardless of this threshold. The UVE method was developed to eliminate uninformative variables [38]. Artificial random variables are added to the data as a reference so that variables playing less important roles in the model than the random variables can be eliminated. Based on this definition of noise, UVE can eliminate non-informative variables. In this study, the Monte-Carlo UVE method is adopted, which is a type of method that has attracted increasing attention [39; 40]. This method combines Monte-Carlo Sampling with PLS regression coefficient for spectral variable selection. The iPLS method is used to divide intervals of equal width without overlapping, which may result in the loss of some variable information and reduce the optimization space for variable combination. The basic idea of the MWPLS method used in this study  
Figure 1: Different spectral regions selected for modeling. is to continuously move a window along the spectral axis. Each movement establishes a model through interactive verification [41], which is more effective than iPLS. GA is a global optimization algorithm that learns from natural selection and genetic mechanisms in the biological world. It uses operators such as selection, crossover, and mutation to retain variables with better objective function values and eliminate poorer ones through continuous genetic iteration, ultimately achieving the optimal result [42]. Currently, GA has been widely used in the field of analytical chemistry, where it has yielded positive results in selecting characteristic variables [43]. The RF method refers to the paper published by [PERSON] et al. in 2013 [44]. It is a variable selection algorithm that offers different selection possibilities based on various variables and has demonstrated a strong performance in feature variable extraction in recent years. The method calculates the probability of each variable being selected through multiple iterations and selects the variable with a high preference probability as the feature variable. To thoroughly evaluate the performance of various variable selection algorithms and investigate how different numbers of spectral variables impact model performance, we allowed each algorithm to select from the following numbers of variables: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000, 2100, 2200, 2300, 2400, 2500, 2600, 2700, 2800, 2900, 3000, 3100, 3200, and 3326 variables, respectively. The total number of spectral variables was 3326.