Accounting for spatial dependence in random forests improves ecological understanding and enhances prediction.
Matthew J Heaton, Michael Dumelle, Kelvyn K Bladen, Ryan A Hill, Jake S Rhodes
Department of Statistics, Brigham Young University, Provo, Utah, USA. · Office of Water, United States Environmental Protection Agency, Corvallis, Oregon, USA.
Key points
From the paper's conclusion- In the river flow application, decorrelation improves held-out prediction and shifts interpretation from broad spatially smooth gradients toward hydrologic and soil variables with more direct mechanistic links to flow seasonality.
Abstract
Random forests (RFs) are widely used in ecology to model complex, nonlinear relationships among environmental variables and to summarize fitted relationships through variable importance and interactions. However, many ecological datasets, particularly observational data collected across space, exhibit spatial dependence. If this spatial dependence is ignored, RFs can incorrectly attribute importance to predictors that serve at least partly as proxies for spatial location. In this study, we evaluate how accounting for spatial dependence changes both predictive performance and ecological interpretation. Using simulations with known data-generating mechanisms and an analysis of 1061 North American river catchments, we compare standard RFs, RFs with spatial residual modeling, and a model-agnostic spatial decorrelation transformation. The simulations show that spatially structured noise variables and raw coordinates can receive inflated importance in standard RF workflows, whereas decorrelation reduces these artifacts and recovers the relevant predictors more consistently. In the river flow application, decorrelation improves held-out prediction and shifts interpretation from broad spatially smooth gradients toward hydrologic and soil variables with more direct mechanistic links to flow seasonality.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Interpretable Machine Learning Reveals Global Nonlinear Responses of Soil Respiration to ClimateGeophysical Research Letters · 2026
- Validation Rigor Determines Apparent Predictive Skill of UAV-LiDAR Carbon Models: A Cautionary Case Study in a Heterogeneous Tropical SavannaForests · 2026
- Supporting the EU Soil Monitoring Law Through Digital Soil Mapping: Evaluating Random Forest-Based Approaches in Tuscany (Italy)Land · 2026
- Enhancing digital mapping of soil organic carbon through spatial modeling and validationScientific Reports · 2026
- Interpreting Random Forests: Comparing Surrogate Models and Rule Extraction MethodsarXiv · 2026
- Spatiotemporal evolution and driving mechanisms of cropland soil salinity in the irrigated area of the Manas River Basin based on random forest modelAgricultural Water Management · 2026