get_importance {spatialRF} | R Documentation |
Gets variable importance scores from rf()
, rf_repeat()
, and rf_spatial()
models.
get_importance(model)
model |
A model fitted with |
A data frame with variable names and importance scores.
rf()
, rf_repeat()
, rf_spatial()
, plot_importance()
, print_importance()
.
if(interactive()){
data(plant_richness_df)
data(distance_matrix)
rf.model <- rf(
data = plant_richness_df,
dependent.variable.name = "richness_species_vascular",
predictor.variable.names = colnames(plant_richness_df)[5:21],
distance.matrix = distance_matrix,
distance.thresholds = 0,
n.cores = 1,
verbose = FALSE
)
x <- get_importance(rf.model)
x
}