Returns the performance slot of an rf()
, rf_repeat()
, or rf_spatial()
model computed on the out-of-bag data.
get_performance(model)
Model fitted with rf()
, rf_repeat()
, or rf_spatial()
.
A data frame with four columns:
metric
Name of the performance metric.
median
Value of the performance metric. Truly a median only if the model is fitted with rf_repeat()
.
median_absolute_deviation
median absolute deviation (MAD), only if the model is fitted with rf_repeat()
, and NA
otherwise.
if(interactive()){
#loading example data
data(plant_richness_df)
data(distance.matrix)
#fitting random forest model
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
)
#getting model performance
x <- get_performance(rf.model)
x
}