Soil pH is a critical indicator of soil health and fertility, influencing nutrient availability and crop productivity. Leveraging real-time sensor technology allows for high-resolution data collection across diverse agricultural landscapes, yet effective modeling techniques are required to interpret these complex datasets. This study evaluated applying generalized additive models (GAMs) to predict soil pH in Mississippi using data collected from an on-the-go soil sensor. pH was the dependent variable, and apparent electrical conductivity shallow (EC as ) and deep readings (EC a d ), x and y coordinates, EC a ratio, altitude, curvature, and slope were the independent variables used to develop GAMs capturing the nonlinear relationships between the predictors and soil pH. For the study site, a GAM derived from the x-coordinate and the x- and y-coordinate interaction was best for estimating pH. It achieved an r-squared value of 0.84 and a root mean squared error of 0.08 on the original testing dataset and an r-squared value of 0.87 and a root mean squared error of 0.07 on a bootstrap simulated dataset created from the original testing set. The model effectively exhibited the nonlinear dynamics of soil pH, providing insights into the relative contributions of individual predictors. This approach enhances prediction accuracy and offers interpretability, allowing agronomists to identify critical factors affecting soil pH. The findings support the potential of GAMs as a valuable tool for precision agriculture, facilitating informed decision-making for soil management and crop production.
KeywordsMachine LearningGeneralized Additive ModelsSoil Chemical PropertiesMobile SensorsCoordinates
Chen, S., Arrouays, D., Leatitia Mulder, V., Poggio, L., Minasny, B., Roudier, P., et al. (2022) Digital Mapping of Globalsoilmap Soil Properties at a Broad Scale: A Review. Geoderma , 409, Article ID: 115567. https://doi.org/10.1016/j.geoderma.2021.115567
Piikki, K., Wetterlind, J., Söderström, M. and Stenberg, B. (2021) Perspectives on Validation in Digital Soil Mapping of Continuous Attributes—A Review. Soil Use and Management , 37, 7-21. https://doi.org/10.1111/sum.12694
McBratney, A.B., Mendonça Santos, M.L. and Minasny, B. (2003) On Digital Soil Mapping. Geoderma , 117, 3-52. https://doi.org/10.1016/s0016-7061(03)00223-4
Minasny, B. and McBratney, A.B. (2016) Digital Soil Mapping: A Brief History and Some Lessons. Geoderma , 264, 301-311. https://doi.org/10.1016/j.geoderma.2015.07.017
Padarian, J., Minasny, B. and McBratney, A.B. (2020) Machine Learning and Soil Sciences: A Review Aided by Machine Learning Tools. Soil , 6, 35-52. https://doi.org/10.5194/soil-6-35-2020
Zhang, G., Liu, F. and Song, X. (2017) Recent Progress and Future Prospect of Digital Soil Mapping: A Review. Journal of Integrative Agriculture , 16, 2871-2885. https://doi.org/10.1016/s2095-3119(17)61762-3
Poppiel, R.R., Demattê, J.A.M., Rosin, N.A., Campos, L.R., Tayebi, M., Bonfatti, B.R., et al. (2021) High Resolution Middle Eastern Soil Attributes Mapping via Open Data and Cloud Computing. Geoderma , 385, Article ID: 114890. https://doi.org/10.1016/j.geoderma.2020.114890
Auzzas, A., Capra, G.F., Jani, A.D. and Ganga, A. (2024) An Improved Digital Soil Mapping Approach to Predict Total N by Combining Machine Learning Algorithms and Open Environmental Data. Modeling Earth Systems and Environment , 10, 6519-6538. https://doi.org/10.1007/s40808-024-02127-8
Nussbaum, M., Zimmermann, S., Walthert, L. and Baltensweiler, A. (2023) Benefits of Hierarchical Predictions for Digital Soil Mapping—An Approach to Map Bimodal Soil pH. Geoderma , 437, Article ID: 116579. https://doi.org/10.1016/j.geoderma.2023.116579
Khaled, F. and Sayed, A. (2023) Soil Ph and Its Influence on Nutrient Availability and Plant Health. International Journal of Advanced Chemistry Research , 5, 68-70. https://doi.org/10.33545/26646781.2023.v5.i2a.204
Anderson, A., Khaleel, A., Dutter, C., Blauwet, M., Flores, A., Miller, B., Burras, C.L. and Fidel, R. (2023) Introduction to Soil Science. Iowa State University, Digital Press. https://iastate.pressbooks.pub/introsoilscience/
O’Kennedy, S. (2022) Soil pH and Its Impact on Nutrient Availability and Crop Growth. International Journal of Geography , Geology and Environment , 4, 236-238.
Kweon, G. and Maxton, C. (2013) Soil Organic Matter Sensing with an On-the-Go Optical Sensor. Biosystems Engineering , 115, 66-81. https://doi.org/10.1016/j.biosystemseng.2013.02.004
Wadoux, A.M.J., Minasny, B. and McBratney, A.B. (2020) Machine Learning for Digital Soil Mapping: Applications, Challenges and Suggested Solutions. Earth - Science Reviews , 210, Article ID: 103359. https://doi.org/10.1016/j.earscirev.2020.103359
Clark, N.J. and Wells, K. (2022) Dynamic Generalised Additive Models (DGAMs) for Forecasting Discrete Ecological Time Series. Methods in Ecology and Evolution , 14, 771-784. https://doi.org/10.1111/2041-210x.13974
Jiang, Y., Gao, W., Zhao, J., Chen, Q., Liang, D., Xu, C., et al. (2018) Analysis of Influencing Factors on Soil Zn Content Using Generalized Additive Model. Scientific Reports , 8, Article No. 15567. https://doi.org/10.1038/s41598-018-33745-9
Wood, S.N. (2017) Generalized Additive Models: An Introduction with R, Second Edition. 2nd Edition, Chapman and Hall/CRC. https://doi.org/10.1201/9781315370279
Soil Survey Staff, Natural Resources Conservation Service, United States Department of Agriculture. Web Soil Survey. https://www.nrcs.usda.gov/wps/portal/nrcs/detail/soils/survey/?cid=nrcseprd1464818
Fletcher, R.S. (2023) Machine Learning Mapping of Soil Apparent Electrical Conductivity on a Research Farm in Mississippi. Agricultural Sciences , 14, 915-924. https://doi.org/10.4236/as.2023.147061
R Core Team. (2025) R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing. https://www.r-project.org/
Kelleher, J., Namee, B. and D’Arcy, A. (2015) Fundamentals of Machine Learning for Predictive Data Analytics: Algorithms, Worked Examples, and Case Studies. The MIT Press.
Wood, S.N. (2010) Fast Stable Restricted Maximum Likelihood and Marginal Likelihood Estimation of Semiparametric Generalized Linear Models. Journal of the Royal Statistical Society Series B : Statistical Methodology , 73, 3-36. https://doi.org/10.1111/j.1467-9868.2010.00749.x
Wood, S.N. (2004) Stable and Efficient Multiple Smoothing Parameter Estimation for Generalized Additive Models. Journal of the American Statistical Association , 99, 673-686. https://doi.org/10.1198/016214504000000980
Wood, S.N. (2003) Thin Plate Regression Splines. Journal of the Royal Statistical Society Series B : Statistical Methodology , 65, 95-114. https://doi.org/10.1111/1467-9868.00374
Wood, S.N., Pya, N. and Säfken, B. (2016) Smoothing Parameter and Model Selection for General Smooth Models. Journal of the American Statistical Association , 111, 1548-1563. https://doi.org/10.1080/01621459.2016.1180986
Zuur, A.F., Ieno, E.N., Walker, N., Saveliev, A.A. and Smith, G.M. (2009) Mixed Effects Models and Extensions in Ecology with R. Springer. https://doi.org/10.1007/978-0-387-87458-6
Cheng, L., Yan, M., Zhang, W., Guan, W., Zhong, L. and Xu, J. (2024) Interpretable Digital Soil Organic Matter Mapping Based on Geographical Gaussian Process-Generalized Additive Model (GGP-GAM). Agriculture , 14, Article 1578. https://doi.org/10.3390/agriculture14091578.