## Materials and Methods
### Research Methods  
#### 2.2.1 The CARS-SCA Characteristic Band Selection Algorithm  
CARS is a new algorithm for spectral characteristic screening. Adaptive reweighted sampling (ARS) is used as the fitness function by the PLS method [14]. Cross-validation is used to optimize the calculation and select the optimal subset, i.e., the subset of the regression model with the highest precision. In addition, the variables with large error are eliminated, after multiple cycles of sampling to select the characteristic bands. There is a correlation between the characteristic bands of the spectra and the As content of the soil, which can be measured by the correlation coefficients. In this study, SCA was used as a correlation analysis tool between the spectra and the soil samples. Commonly used methods for amplifying characteristic bands are SD, Gaussian filtering (GF), and min-max normalization (MMN) pretreatments. In this study, a new method was used to combine the pretreatment methods of the spectra, to select the most suitable spectral bands. The specific process is as follows:  
Step 1: The Monte Carlo sampling (MCS) method was used to randomly extract 80% of the sample set as a calibration set, and to establish a PLS regression model. \(M_{bp}\) represents the \(l\) sample and \(p\) variable spectral matrix of the calibration set. \(y_{l\times 1}\) represents the As content of the soil of the calibration set. \(T\) represents the scoring matrix of \(M\), and \(B\) represents the \(M\) and \(T\) contact coefficient matrix. \(c\) represents the regression coefficient vector of the PLS correction model established by \(y\) and \(T\). \(f\) represents the prediction residual. The following relationships are established:  
\[T=MB \tag{1}\]  
\[y=Tc+f=MBc+f=Ah+f \tag{2}\]  
where \(h=Bc=[h_{1},h_{2},...,h_{p}]^{T}\) is the p-dimensional coefficient vector. The absolute value of the ith element in \(B\), denoted as \(|h_{i}|(1\leq i\leq p)\), reflects the ith wavelength's contribution to \(y\). Therefore, the larger the value of \(|h_{i}|\), the more important this variable is. The weight value is defined as:  
\[w_{i}=\frac{h_{i}}{\sum_{i=1}^{p}|h_{i}|},i=1,2,...,p \tag{3}\]  
We assume that there are P wavelength points in the entire spectral range, and that there are N MCSs in the CARS. As mentioned before, wavelength selection in CARS is a two-step process. In the first step, an exponentially decreasing function (EDF) is used to force the removal of wavelengths with relatively small absolute regression coefficients, At the ith MCS, the retention rate of the wavelength point can be obtained based on the following EDF:  
\[r_{i}=ae^{-ki} \tag{4}\]  
where \(a\) and \(k\) are two constants:  
\[a=(p/2)^{1/(N-1)},\;\;k=\frac{\ln(p/2)}{N-1} \tag{5}\]  
N times of MCS can be used to obtain N PLS models. Each model is used to calculate one root-mean-square error of cross-validation (RMSECV) value. We finally select the subset of variables with the smallest RMSECV value, which is the optimal variable subset. Step 2: The spectral set matrix \(M\) is preprocessed. \(M=[X_{1},X_{2},...,X_{i}]\), \(M\) is an i-dimensional vector of \(X\), and \(X_{i}\) is the spectral curve of each soil sample.\(y_{i}\) represents the As content of the soil of the calibration set. According to the Spearman's rank correlation coefficient [15], the formula is as shown in Equation (6), and the calculation result is obtained as the correlation coefficient row vector. The corresponding \(\rho\) is the Spearman's rank correlation coefficient of the corresponding bands, where the bands with higher correlation coefficients are selected. \[\rho=\frac{\sum_{i}^{N}{(x_{i}-\overline{x})(y_{i}-\overline{y})}}{\left[\sum_{i-1} ^{N}{(x_{i}-\overline{x})^{2}\sum_{i-1}^{N}{(y_{i}-\overline{y})^{2}}}\right]^{ \frac{1}{2}}}=1-\frac{6\sum{d_{i}}^{2}}{N(\text{N}^{2}-1)} \tag{6}\]  
where N is the number of samples, and \(d_{i}=x_{i}-y_{i}\) is the gradation difference of two paired variables.