get_performance {spatialRF} | R Documentation |
Gets out-of-bag performance scores from a model
Description
Returns the performance slot of an rf()
, rf_repeat()
, or rf_spatial()
model computed on the out-of-bag data.
Usage
get_performance(model)
Arguments
model |
Model fitted with |
Value
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 withrf_repeat()
. -
median_absolute_deviation
median absolute deviation (MAD), only if the model is fitted withrf_repeat()
, andNA
otherwise.
See Also
Examples
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
}
[Package spatialRF version 1.1.4 Index]