## 3 Methods
### VNIR-Based Prediction Methods
#### 3.3.1. PLS-MARS Method
The estimation of a true function \(f(t)\) utilizing the MARS method [16] based on BFs is expressed as follows:  
\[\hat{f}\big{(}t_{1},\cdots,t_{p}\big{)}=\sum_{m=0}^{M}a_{m}B_{m}\big{(}t_{1}, \cdots,t_{p}\big{)} \tag{5}\]  
where coefficient \(a_{m}\) is obtained using the least squares method and \(B_{m}\big{(}t_{1},\cdots,t_{p}\big{)}\) (Equation (6)) is one of the BFs, which is multiplied by several \(b_{k,m}\) as shown in Equation (7). \[B_{m}\big{(}t_{1},\cdots,t_{p}\big{)}=\prod_{k=1}^{K_{m}}b_{k,m}\Big{(}t_{v(k,m)}\Big{|}P_{k,m}\Big{)} \tag{6}\]  
where \(K_{m}\) is the number of \(b_{k,m}\) (Equation (7)), which is a bilateral truncation power function decided by the parameters \(P_{k,m}\) and explanatory variables \(t_{v}(k,m)\) that correspond to the \(k\)th truncated spline BF (SBF) in the \(m\)th term of Equation (6). \[b_{k,m}\Big{(}t_{v(k,m)}\Big{|}P_{k,m}\Big{)}=\Big{[}S_{k,m}\times\Big{(}t_{v (k,m)}-r_{k,m}\Big{)}\Big{]}_{+}^{q}=max(0,\;S_{k,m}\times\Big{(}t_{v(k,m)}-r_ {k,m}\Big{)}^{q} \tag{7}\]  
where \(P_{k,m}=(S_{k,m},r_{k,m})\), truncation direction \(S_{k,m}=\pm 1\), \(r_{k,m}\) is the knot of the BF \(b_{k,m}\Big{(}t_{v(k,m)}\Big{|}P_{k,m}\Big{)The process of constructing a MARS model consisted of forward selection and backward pruning. In forward selection, four steps were conducted, as follows:  
Step 1: BF was set as \(B_{0}(t)=1\), and the threshold of the number of BFs and the threshold of the model precision were set. Step 2: Two new adaptive BFs that yielded the minimum training error were iteratively created. Step 3: Step 2 was repeated until the number of BFs reached the number threshold or the model precision reached the threshold. Step 4: All BFs and related parameters were provided. In forward selection, permission was limited to adding BFs. Accordingly, several BFs were used merely for constructing succeeding BFs and contributed insignificantly to the eventual model. The threshold of the number of BFs was generally set as high in the forward selection process. Hence, the backward pruning for deleting redundant BFs was necessary. In backward pruning, the model was simplified by deleting one least important BF (based on generalized cross-validation (GCV)) at each step until no more BFs were available to be deleted. A new model was rebuilt at each step; the model with the minimum GCV was selected as the eventual prediction model. GCV is computed in accordance with Equation (8). \[GCV=\frac{\frac{1}{N}\sum_{i=1}^{N}\left[y_{i}-\hat{f}(t_{i})\right]^{2}}{ \left[1-\frac{M+d\times\frac{(M-1)}{2}}{N}\right]^{2}} \tag{8}\]  
where \(N\) is the size of the calibration set, \(M\) is the number of BFs in the model, \(d\) is a penalizing factor, which is set as 3 in this study according to a report [16; 25], and \((M-1)/2\) denotes the number of the hinge function knots. Consequently, the function penalizes the model for its number of BFs and knots. In establishing a MARS model, a series of threshold values was preset to realize the adaptive operation and obtain a suitable result. Accordingly, the model with the minimum GCV was selected as the eventual model. The implementation of the PLS-MARS method was realized using MATLAB software.