Easy Spatial Modeling with Random Forest

Automatic generation and selection of spatial predictors for Random Forest models fitted to spatially structured data. Spatial predictors are constructed from a distance matrix among training samples using Moran's Eigenvector Maps (MEMs; Dray, Legendre, and Peres-Neto 2006 ) or the RFsp approach (Hengl et al. ). These predictors are used alongside user-supplied explanatory variables in Random Forest models. The package provides functions for model fitting, multicollinearity reduction, interaction identification, hyperparameter tuning, evaluation via spatial cross-validation, and result visualization using partial dependence and interaction plots. Model fitting relies on the 'ranger' package (Wright and Ziegler 2017 ).


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("spatialRF")

1.1.5 by Blas M. Benito, 10 months ago


https://blasbenito.github.io/spatialRF/


Report a bug at https://github.com/BlasBenito/spatialRF/issues/


Browse source code at https://github.com/cran/spatialRF


Authors: Blas M. Benito [aut, cre, cph] (ORCID:


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports dplyr, ggplot2, magrittr, stats, tibble, utils, foreach, doParallel, ranger, rlang, tidyr, tidyselect, huxtable, patchwork, viridis

Suggests testthat, spelling


See at CRAN