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 rf(), rf_repeat(), or rf_spatial().

Value

A data frame with four columns:

See Also

print_performance()

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]