**3. Diagnostic methods**

#### **3.1 Soil test diagnosis**

The sufficiency level of available nutrients (SLAN), the basic cation saturation ratio (BCSR), and soil test buildup and maintenance (STBM) are the main soil test interpretation philosophies [34]. The SLAN and BCSR addressed the relatively immobile nutrients (P, K). The STBM was used to manage N, P, and K. Critical and maintenance soil test levels were delineated from field trials.

Bray (1963) [22] assumed that (1) for nutrients relatively immobile in soils such as P and K, soils and fertilizers have nutrient-supply coefficients specific to plant species, planting patterns and rates, provided that soil and climatic conditons are similar and (2) response patterns can be described by the Mitscherlich equation. The SLAN related soil test P and K to percentage yield using the Mitscherlich-Bray equation. Alternatively, the relationship was partitioned into soil fertility classes each given a probability of response to fertilization [34, 37]. Compared to actual yield, percentage yield showed higher correlation with soil test level. Percentage yields have been first expressed as yield at 0-level of nutrient, other factors assumed to be at adequate levels, divided by yield where all factors were assumed to be at adequate levels. Percentage yields were also expressed as response ratios, i.e., *ln Y*ð Þ *treatment=Ycontrol* , i.e. yield gain of treatment over that of control, to run metaanalysis at regional scale [38]. Using yield percentage and probability of response, the SLAN concept assumed random effects across factors not being varied and thus hid the effects of local factors that impact crop yield.

The BCSR postulated, without proper calibration, that "ideal" cationic ratios and saturation levels should be maintained on soil cation exchange capacity to maximize yield [28]. The application of such concept to fertilization decisions failed under field conditions, most often leading to overfertilization [39]. Nevertheless, BCSR may assist making decisions on liming and lime sources to neutralize soil acidity, provide proper cementing agents bridging soil particles and improve soil aggregation [24]. In comparison, compositional data analysis methods proved to be a more appropriate approach to run statistical analysis on results of soil tests for cations and other cementing agents [29, 40].

The STBM concept has been elaborated from nutrient budgets, nutrient-use efficiency and soil P-fixing capacity as an attempt to adjust fertilization to local conditions. Expected yield and plant- and soil-specific coefficients were assessed from field observations and pot trials [41]. Soil P fixing capacity has been assessed in priority in Brazil, but coefficients estimated from literature often proved to be unrealistic, leading to overfertilization at local scale, especially for P [42].

Transferring SLAN, BCSR and STBM regional models to the local scale cannot be a straightforward operation. Growers' heuristics is traditionally to look for successful practices developed under comparable environmental and managerial conditions as reported in their neighborhood. Alternatively, large and diversified datasets can be documented and synthesized into a diagnostic kit of features easy-to-acquire by stakeholders at reasonable cost and effort among those presented in **Tables 1** and **3**. The minimum package of facts, factors and local knowledge supporting fertilization decisions can be handled by machine learning models to diagnose growthlimiting factors and predict crop yields after correction. Thereafter, compositional data analysis can rank dianosed components in the order of their limitations to yield to support nutrient management [43–46]. Yield can be predicted in regression mode. Besides, the classification mode can provide a list of high-yielding and balanced specimens as benchmarks for use at local scale, as well as the probability to yield more than some yield target.

*Machine Learning, Compositional and Fractal Models to Diagnose Soil Quality and Plant… DOI: http://dx.doi.org/10.5772/intechopen.98896*

### **3.2 Soil quality diagnosis**

The interpretation of soil quality indicators requires well defined values, otherwise, the indicators cannot be used in practice to support management decisions [35]. Benchmarks could be native soil, reference sites, or successful combinations of comparable factors for agronomically or environmentally performing soils. Scores could have thresholds for (1) more than is better, (2) optimum range, (3) less than is better, or (4) undesirable range [47]. Principal component analysis (PCA), redundancy analysis (RDA), discriminant analysis and multiple regression have been used to process data.

Soil aggregation is a key indicator of soil quality. Mean weight diameter (MWD) is a common indicator of soil aggregation computed as follows:

$$\mathbf{M} \mathbf{W} \mathbf{D} = \sum\_{i=1}^{D} \overline{\mathbf{x}\_{i}} \mathbf{w}\_{i} \tag{1}$$

Where *x* is aggregate diameter and *wi* is the mass of the ith aggregate fraction. Mean particle diameter is assessed as average sieve size between successive sieves rather measured as average particle size. The contribution of the largest fractions is inflated artificially by multiplying the fraction by its diameter.

The MWD is numerically biased, unevenly weighted, and computed from aggregate-size fractions that vary widely among studies [40]. Alternatively, patterns of aggregate fragmentation can be synthesized into fractal dimensions. It is assumed that aggregates collapse following mechanical stress into smaller fragments of similar shape. Aggregates left on each sieve are counted after subtracting the sand fraction (> 53 μm) on each sieve [40] as follows:

$$\mathbf{N(d\_i)} = \mathbf{M(d\_i)} / \left(\mathbf{d\_i^3 \rho\_i c\_i}\right) \tag{2}$$

Where *N d*ð Þ*<sup>i</sup>* is the number of particles, *M d*ð Þ*<sup>i</sup>* is the mass of aggregates of the ith aggregate-size fraction, *di* is mean diameter and *ρ<sup>i</sup>* is bulk density. Note that *ρ<sup>i</sup>* must differ between the stronger and denser micro- and the more friable macroaggregates. The shape coefficient *ci* refers to a cube. Particle volume can be computed as x3 , x being the average opening between two successive sieves.

The fractal dimension *Df* is estimated as follows:

$$\mathbf{S(d\_k)} = \sum\_{\mathbf{i}}^{\mathbf{k}} \mathbf{N(d\_i)} = \mathbf{ad\_k^{-D\_{\mathbf{f}}}} \tag{3}$$

Where *S d*ð Þ*<sup>k</sup>* is the cumulated number of particles with diameter ≤ *dk*, *N d*ð Þ*<sup>i</sup>* is the number of particles in the ith size fraction, *α* is a proportionality parameter, and *Df* , the fragmentation fractal dimension, is a scaling factor derived from the log–log relationship between *S d*ð Þ*<sup>k</sup>* and *dk*.

The fractal model for soil aggregation is presented in **Table 4** and **Figure 1**. The fractal was found to be 2.51 (slope), indicating well aggregated soil. Fractal dimensionality is generally between 2 and 3 for the 3-D soil aggregates, but may exceed even 3, a result difficult to interpret physically. Aggregate-size fragments have contrasting friability, often showing several fractal patterns. However, the fractal dimensions have the disadvantage of being assessed from a limited number of sieves.

Carbon sequestration plays a key role to enhance soil quality and abate greenhouse gases. Because aggregates reduce the contact between the organic substrate


**Table 4.**

*Computation of variables log(x) and log N(dk) to derive the fractal dimension of soil aggregates.*

**Figure 1.** *Fractal dimension of that soil aggregation pattern is 2.51.*

and its immediate environment as they build up in soils, the decomposition rates of organic particles decrease with time, allowing organic matter to accumulate [19]. First-order kinetics of organic matter decomposition in soils *k t*ð Þ is controlled by fractal coefficient *h* as follows:

$$\mathbf{k}(\mathbf{t}) = \mathbf{k}\_1 \mathbf{t}^{-\mathrm{h}} \tag{4}$$

Where *k*<sup>1</sup> is decomposition rate at time t = 1 and *h* is fractal coefficient. If h ! 0, *k* is non-fractal and the reaction proceeds at maximum rate; if h ! 1, decomposition rate is fractal, indicating that protection mechanisms control reaction rate during soil agradation or degradation. Parent [19] found fractal coefficient of 0.71 for wellaggregated soils under pasture compared to 0.45 for annual cropping and 0.25 for a degraded soil under fallow. Hence, the fractal coefficient is a measure of carbon protection mechanisms developing as soil quality increases or of loss in protection mechanisms leading to soil degradation.

The soil aggregation has also been expressed in terms of isometric log ratios (*ilr*) or coordinates [40]. The *ilr* is computed as a balance between two groups of aggregate fractions, as follows:

*Machine Learning, Compositional and Fractal Models to Diagnose Soil Quality and Plant… DOI: http://dx.doi.org/10.5772/intechopen.98896*

$$\text{silr} = \sqrt{\frac{\text{rs}}{\text{r} + \text{s}}} \ln \left( \frac{\text{G}\_1}{\text{G}\_2} \right) \tag{5}$$

Where *r* and *s* are numbers of aggregate-size fractions at numerator and denominator, respectively, and *G*<sup>1</sup> and *G*<sup>2</sup> are geometric means of aggregate-size fractions at numerator and denominator, respectively. The balance dendrogram in **Figure 2** is a system of balances among five aggregate-size fractions starting with a general balance between micro- (< 0.25 mm) and macro- (> 0.25 mm) aggregates where *r* = 4 (the number of macro-aggregate fractions) and *s* = 1 (the microaggregate fraction). The balance between micro- and macro-agregates in **Table 4** is computed as follows:

$$\text{ill}\_{[\text{microaggreglets}|\text{maragreglets}]} = \sqrt{\frac{5 \times 1}{5 + 1}} \ln \left( \frac{(0.0813 \times 0.0659 \times 0.787 \times 0.0242 \times 0.0171)^{1/5}}{(0.0332)^1} \right)$$

$$= 0.268$$

$$\text{(6)}$$

Because *ilr* transformation allows projecting compositions into the Euclidean space, Euclidean distance *ε* can be computed between two soil aggregation states across *ilr* dimensions to indicate whether the soil is degrading or agrading, as follows [40]:

$$\mathbf{e} = \sqrt{\sum\_{j=1}^{D-1} \left( \mathbf{i} \mathbf{l} \mathbf{r}\_j - \mathbf{i} \mathbf{l} \mathbf{r}\_j^\* \right)^2} \tag{7}$$

Where *j* is a compositional dimension. Because computations are made on a mass basis rather than particle counts as for fractal dimensions, there is no need to make assumptions about *ρ<sup>i</sup>* and *ci*. The benchmark aggregation state could be defined as ultimate aggregation state where all aggregates pass through the smallest sieve size.

**Figure 2.**

*Balance dendogram contrasting micro- and macro-aggregates and macro-aggregates.*
