# Estimation of Cultivated Land Quality Based on Soil Hyperspectral Data
## 2 Materials and Methods
### Methods
#### 2.3.2 Determining the Optimal Algorithm for Estimating CLQ  
In this study, a linear algorithm (partial least-squares regression (PLSR)) and a non-linear algorithm (back-propagation neural network (BPNN)) were used to construct CLQ estimation model.  
PLSR is an algorithm proposed by [PERSON] that is used for multivariate analysis [27]. This algorithm has been widely used in the field of science and has achieved favorable results because it can describe a relationship if the size of predictors is far larger than that of the training samples [28]. PLSR was used to establish a linear relationship model between the optimal soil spectral variables and CLQ. The PLSR is expressed as:  
\[Y=X\beta+\varepsilon \tag{4}\]  
where \(Y\) is the normalized dependent variable (value of CLQ), \(X\) is the normalized independent variable (optimal soil spectral variables), \(\beta\) is the coefficient matrix, and \(\varepsilon\) is the residual matrix.  
The BPNN algorithm was applied to describe the nonlinear relationship between the optimal soil spectral variables and CLQ. The algorithm consists of a multi-layer feed-forward network trained by an error back-propagation algorithm [29; 30]. The steepest descent method in the BPNN is used to adjust the weights, and the back-propagation algorithm is utilized to minimize the error of the network [31; 32]. The BPNN includes three parts: input layer, hidden layer, and output layer. The transfer function from the input layer to the hidden layer can be expressed as:  
\[O_{j}=f_{i}\big{(}\sum(\omega_{ji}O_{i}+\theta_{j}\big{)} \tag{5}\]  
where \(O_{i}\) is the value of the optimal soil spectral variables; \(O_{j}\) is the hidden layer information; \(\omega_{ji}\) is the weight of the input layer to the hidden layer; \(f_{i}\) is the transfer function from the input layer to the hidden layer (the _Trainlm_ function is selected in this study); \(\theta_{j}\) is the hidden layer threshold.  
The transfer function from the hidden layer to the output layer is written as:  
\[O_{k}=f_{i}\big{(}\sum(\omega_{kj}O_{j}+\theta_{k}\big{)} \tag{6}\]  
where \(O_{k}\) is the predicted value of CLQ; \(f_{i}\) is the transfer function from the hidden layer to the output layer (the _Purelin_ function is selected in this study); \(\omega_{kj}\) is the weight of the hidden layer to the output layer; \(\theta_{k}\) is the threshold of the output layer.  
To lower the mean square error (MSE) between the predicted and measured values, the Levenberg-Marquardt algorithm was employed to alter the connection weight from the output layer to the input layer. The MSE is expressed as:  
\[\text{MSE}=\frac{1}{N}\sum(O-O_{k})^{2} \tag{7}\]  
where \(O\) is the measured value of CLQ, \(O_{k}\) is the predicted value of CLQ, and \(N\) is the number of training samples.  
In this study, the determination coefficient (R\({}^{2}\), Equation (8)), the normalized root mean square error (NRMSE, Equation (9)), and concordance correlation coefficient (CCC, Equation (10)) were used to assess the performance of the CLQ estimation models. The equations are calculated as [33; 34]:  
\[R^{2}=\frac{\sum_{i=1}^{N}(y_{i}-\overline{y}_{i})^{2}}{\sum_{i=1}^{N}(\overline {y}_{i}-\overline{y}_{i})^{2}} \tag{8}\]  
\[\text{NRMSE}=\frac{\sqrt{\frac{1}{N}\sum_{i=1}^{N}(y_{i}-\overline{y}_{i})^{2 }}}{\overline{y}} \tag{9}\]  
\[\text{CCC}=\frac{2\frac{1}{N}\sum_{i=1}^{N}(y_{i}-\overline{y}_{i})\big{(} \hat{y}_{i}-\overline{y}_{i}\big{)}}{\frac{1}{N}\sum_{l=1}^{N}(y_{i}-\overline {y}_{i})^{2}+\frac{1}{N}\sum_{l=1}^{N}\big{(}\hat{y}_{i}-\overline{y}_{i} \big{)}^{2}+\big{(}\overline{y}_{i}-\overline{y}_{i}\big{)}^{2}} \tag{10}\]  
where \(y_{i}\) is the measured CLQ, \(\hat{y}_{i}\) is the predicted CLQ, \(\overline{y}_{i}\) is the average value of the measured CLQ, \(\overline{y}_{i}\) is the average value of the predicted CLQ, and \(N\) is the number of the samples.