## 2 Materials and Methods
### Multivariate Analysis
#### 2.4.3 Optimal Wavelength Selection Methods  
HSI generated a large amount of data. How to deal with this data is an important issue. The spectral data extracted from the hyperspectral images suffer from the risk of colinearity, redundant and uninformative wavelengths, resulting in complex and unstable models. Optimal wavelength selection aims at selecting a few wavelengths containing the most useful information from the full spectrum for analysis instead of the full spectrum. The selection of optimal wavelengths could improve the model performance and simplify the model. Selection of optimal wavelengths could significantly reduce both the spectral and image data. In HSI, optimal wavelength selection could also make the image visualization easy. Four different variable selection methods were used in this study, including the successive projections algorithm (SPA) [11], weighted regression coefficient (\(Bw\)) [12], random frog (RF) [13], and competitive adaptive reweighted sampling (CARS) [14].  
SPA is a forward variable selection method. SPA projects one variable on the remaining variables, and the variables with maximum projection are selected as candidate subset, when the selected candidate variables reach the predefined number of variables. Then multiple linear regression (MLR) models were built on different numbers of variables, and the variables corresponding to the minimum root mean square error of cross-validation (RMSECV) of the MLR model are selected as the final optimal wavelengths.  
Weighted regression coefficient (\(Bw\)) is a variable selection method derived from PLSR. To acquire \(Bw\), the spectral data could be standardized to the same scale, and a new PLSR model is built on the standardized spectrum. Then, \(Bw\) is acquired from the new PLSR model. The \(Bw\) values indicate the relative importance of wavelengths. The peaks and valleys of the wavelength-\(Bw\) plot could then be manually selected as the optimal wavelengths.  
Random frog is an efficient variable selection method [13]. Random frog simply uses the random frog algorithm to generate subsets, and then the PLSR models are used to evaluate the proposed subsets. The basic procedure of RF is: (1) generate a variable subset as the initialized subset by randomly selecting a predefined number of variables from the original variables; (2) generate a new variable subset based on the initialized subset, and evaluate the initialized subset and the new subset to determine if the initialized subset could be updated by the new subset with a certain probability; and (3) after the predefined iterations of step 2, the probability of each variable selected in all iterations are calculated to determine the optimal wavelengths.  
CARS is also an efficient variable selection method based upon PLSR models. CARS uses regression coefficients of PLSR models as variable importance indicators. In CARS, PLSR models are built according to a predefined number of Monte Carlo sampling, and the weights of the absolute regression coefficients of each variable are calculated and compared. The variables with smaller weights of the absolute regression coefficients are eliminated based a predefined rule. For each iteration, PLSR models are built using the selected variables, and until the iteration ends, the variables corresponding to the minimum RMSECV of three-fold cross-validation are selected as the optimal wavelengths.