Random forest algorithm applied to model soil textural classification in a river basin - dos Santos, Arthur Pereira [UNESP]; da Silva Junior, Alessandro Xavier [UNESP]; Nery, Liliane Moreira [UNESP]; Gomes, Gabriela [UNESP]; Toniolo, Bruno Pereira [UNESP]; da Cunha e Silva, Darllan Collins [UNESP]; Lourenço, Roberto Wagner [UNESP] (Springer Nature, 2025)
The proportion of sand, silt, and clay defines soil texture, significantly influencing agricultural and ecological practices. However, conventional classification methods are costly and limit evaluation frequency and scope. In contrast, machine learning algorithms, such as random forest, provide a more efficient solution for accurate soil texture predictions. This study aims to address this knowledge gap by integrating geoprocessing, precision agriculture, and machine learning to classify soil texture in the Sorocabuçu River Basin (SRB), predominantly agricultural. Twenty-seven sampling points were selected based on topography and land use, ensuring the representativeness of area variations and the reliability of classification. Granulometric analysis was performed using the pipette method to separate sand, silt, and clay. The data were spatially interpolated using geographic information system (GIS) techniques. Soil texture was classified using the random forest algorithm, trained on 70% of the data and tested on 30%, evaluating overall accuracy, kappa index, sensitivity, and specificity. Fifty trees (ntree) and four features per split (ntry) were used, considering the variability of parameters to ensure satisfactory results. The varied spatial distribution of clay, along with high levels of sand and silt, suggests greater vulnerability to erosion without conservation management practices. The random forest model achieved an out-of-bag (OOB) error of 2.78%, a kappa index of 0.88, and an overall accuracy of 0.92, demonstrating excellent predictive capacity. The variability of sand was essential, but the Sandy Clay Loam (SCL) class posed challenges due to its intermediate characteristics between sand and clay, resulting in classification overlaps. This integrated methodology enhances understanding of soil structure in the SRB and provides a foundation for future research and practical applications, supporting food security and environmental sustainability. The model can be applied in other locations and agricultural contexts. In homogeneous soils, the method can be improved through the application of machine learning algorithms to enhance accuracy.
Keywords: Machine learning; Precision agriculture; Soil erosion; Soil textural classification