3. Building ANNs for soil properties

A full process of modeling soil properties with ANNs was composed of building ANN structure, training ANNs, and network optimization.

#### 3.1. Building ANN structure

The most popular ANN in modeling soil properties is back-propagation (BP) ANN because this kind of ANNs can map non-linearity when limited discontinuous points exist between input and output data in Ref. [35]. Common BP ANN has three layers: the input layer contains the independent variables used to make model predictions; the output layer contents variables to be predicted; hidden layer connects the input layer and output layer. Each node in one layer is linked with all nodes of the adjacent layer. The number of nodes in the hidden layer determined the complexity of the model. The input weight matrix consisted of all links between the input layer and the hidden layer and the output weight matrix consisted of all links between the hidden layer and the output layer. Weight (w), which affects the propagation value (x) and the output value (o) from each node, was fine-tuned using the value from the preceding layer based on Eq. (8).

Using Artificial Neural Networks to Produce High-Resolution Soil Property Maps http://dx.doi.org/10.5772/intechopen.70705 59

Figure 6. A sample of target data referring to polygons and points.

$$
\sigma = f\left(-T + \sum w\_i \mathbf{x}\_i\right) \tag{8}
$$

where T was a specific threshold (bias) value for each node; f was a non-linear sigmoid function, which increased monotonically.

When building ANNs for soil properties, the combinations of coarse resolution soil data (i.e., average soil drainage, sand, clay, silt contents) and DEM-derived topo-hydrological data (i.e., slope, STF, SDR, VSP) composed the input layer nodes. Predicted soil properties were the nodes in output layer.

#### 3.2. Training ANNs

2.2. Target data

directly affect the performance of ANNs.

58 Advanced Applications for Artificial Neural Networks

3.1. Building ANN structure

preceding layer based on Eq. (8).

3. Building ANNs for soil properties

structure, training ANNs, and network optimization.

Target data, used as reference data in training ANNs, were composed of collecting field soil samples with soil property data (Figure 6). Representativeness and density of target data will

Figure 5. Comparison of coarse resolution soil map (A) and high-resolution soil map (B).

A full process of modeling soil properties with ANNs was composed of building ANN

The most popular ANN in modeling soil properties is back-propagation (BP) ANN because this kind of ANNs can map non-linearity when limited discontinuous points exist between input and output data in Ref. [35]. Common BP ANN has three layers: the input layer contains the independent variables used to make model predictions; the output layer contents variables to be predicted; hidden layer connects the input layer and output layer. Each node in one layer is linked with all nodes of the adjacent layer. The number of nodes in the hidden layer determined the complexity of the model. The input weight matrix consisted of all links between the input layer and the hidden layer and the output weight matrix consisted of all links between the hidden layer and the output layer. Weight (w), which affects the propagation value (x) and the output value (o) from each node, was fine-tuned using the value from the

The aim of training ANN is confirming coefficients according to different rules or algorithms. BP ANN is trained by self-adjusting weight and bias values of each neuron along a negative gradient descent to minimize the mean squared error (MSE) in Ref. [36]. The MSE between the network outputs (o) and targeted values (t) was calculated through each training cycle (i) by Eq. (9). Training was stopped when the MSE could not be reduced by a set threshold. Frequently-used algorithm included the Levenberg-Marquardt (LM) algorithm and the resilient (RP) algorithm. The LM algorithm was based on Levenberg-Marquardt optimization theory in Ref. [37]. The RP was a kind of rebound back-propagation algorithm in Ref. [38].

$$MSE = \frac{1}{n} \sum\_{i=1}^{n} \left( t\_i - o\_i \right)^2 \tag{9}$$

An early stopping method was used to avoid "over-fitting", which has the effect of decreasing prediction accuracy outside of the training data, and improving ANN generalization in Ref. [39, 40]. Through this method, in order to compute the gradient, update the network weights and estimate biases, a training set was used. Another data set, that is, the validation set, was applied to monitor the training process with the purpose of preventing "over-fitting". If training MSE decreased but the validating MSE increased, the training of the ANN model was stopped.

#### 3.3. ANN optimization

The purpose of ANN optimization is adjusting networks structure and improving prediction accuracy of ANNs. It included two parts: (1) selecting the best combination of inputs. The schemes of combining inputs should follow one-variable, two-variable, three-variable, etc. (2) selecting the fittest number of hidden layer's nodes. When the number of hidden layer nodes was too small, prediction accuracy of the ANN was low. When the number of hidden layer nodes was too large, there was a potential over-fitting.
