get_performance: Extract out-of-bag performance metrics from model

View source: R/get_performance.R

get_performanceR Documentation

Extract out-of-bag performance metrics from model

Description

Extracts out-of-bag (OOB) performance metrics from models fitted with rf(), rf_repeat(), or rf_spatial().

Usage

get_performance(model)

Arguments

model

Model object from rf(), rf_repeat(), or rf_spatial().

Details

Out-of-bag (OOB) performance is computed using observations not included in bootstrap samples during model training. Metrics typically include R-squared, pseudo R-squared, RMSE, and normalized RMSE. For repeated models, the median and median absolute deviation summarize performance across repetitions.

Value

Data frame with performance metrics:

  • For rf() and rf_spatial(): columns metric and value

  • For rf_repeat(): columns metric, median, and median_absolute_deviation (MAD across repetitions)

See Also

rf(), rf_repeat(), rf_spatial(), print_performance()

Other model_info: get_evaluation(), get_importance(), get_importance_local(), get_moran(), get_predictions(), get_residuals(), get_response_curves(), get_spatial_predictors(), print.rf(), print_evaluation(), print_importance(), print_moran(), print_performance()

Examples

data(plants_rf)

# Extract OOB performance metrics
performance <- get_performance(plants_rf)
performance

# For repeated models, median and MAD are returned
# (example would require rf_repeat model)


spatialRF documentation built on Dec. 20, 2025, 1:07 a.m.