Observed response minus fitted.rf_fit, which for a forest is
the out-of-bag prediction: each observation predicted only by the
trees that did not see it. These are therefore already held-out residuals,
unlike residuals.gwr_fit() and residuals.bayesian_fit(),
which are in-sample. Feed them to residual_morans_i() to test
whether spatial structure the forest failed to capture is still sitting in
the residuals. Out-of-bag is not a substitute for spatial CV: use
cv_rf() for an honest map-accuracy figure.
Usage
# S3 method for class 'rf_fit'
residuals(object, ...)See also
Other methods on a fitted model:
coef.bayesian_fit(),
coef.gwr_fit(),
coef.rf_fit(),
fitted.bayesian_fit(),
fitted.gwr_fit(),
fitted.rf_fit(),
model_metrics(),
predict.bayesian_fit(),
predict.gwr_fit(),
predict.rf_fit(),
print.rf_fit(),
print.spatial_fit(),
residuals.bayesian_fit(),
residuals.gwr_fit(),
summary.spatial_fit()