View source: R/get_spatial_predictors.R
| get_spatial_predictors | R Documentation |
Extracts the spatial predictors (Moran's Eigenvector Maps) used in a model fitted with rf_spatial().
get_spatial_predictors(model)
model |
Model object from |
Spatial predictors are Moran's Eigenvector Maps (MEMs) automatically generated and selected by rf_spatial() to capture spatial autocorrelation patterns in the data. This function extracts these predictors, which can be useful for understanding spatial structure or for making predictions on new spatial locations.
Data frame containing the spatial predictor values for each observation, with predictors ordered by decreasing importance.
rf_spatial(), mem(), mem_multithreshold(), get_importance()
Other model_info:
get_evaluation(),
get_importance(),
get_importance_local(),
get_moran(),
get_performance(),
get_predictions(),
get_residuals(),
get_response_curves(),
print.rf(),
print_evaluation(),
print_importance(),
print_moran(),
print_performance()
data(plants_rf_spatial)
# Extract spatial predictors
spatial_preds <- get_spatial_predictors(plants_rf_spatial)
head(spatial_preds)
# Check dimensions
dim(spatial_preds)
# View predictor names (ordered by importance)
colnames(spatial_preds)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.