View source: R/get_performance.R
get_performance | R Documentation |
Returns the performance slot of an rf()
, rf_repeat()
, or rf_spatial()
model computed on the out-of-bag data.
get_performance(model)
model |
Model fitted with |
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.
print_performance()
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 }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.