Skip to contents

Prints variable importance scores from rf, rf_repeat, and rf_spatial models.

Usage

print_importance(
  model,
  verbose = TRUE
)

Arguments

model

A model fitted with rf, rf_repeat, or rf_spatial.

verbose

Logical, if TRUE, variable importance is returned. Default: TRUE

Value

A table printed to the standard output.

Examples


data(plants_rf)

print_importance(plants_rf)
#>                 ┌─────────────────────────────────┬────────────┐
#>Variable                       Importance
#>                 ├─────────────────────────────────┼────────────┤
#>                 │ climate_bio1_average            │   1949.457 │
#>                 ├─────────────────────────────────┼────────────┤
#>                 │ human_population                │   1595.806 │
#>                 ├─────────────────────────────────┼────────────┤
#>                 │ climate_hypervolume             │   1188.702 │
#>                 ├─────────────────────────────────┼────────────┤
#>                 │ bias_area_km2                   │   1177.989 │
#>                 ├─────────────────────────────────┼────────────┤
#>                 │ human_population_density        │   1026.905 │
#>                 ├─────────────────────────────────┼────────────┤
#>                 │ human_footprint_average         │   1021.417 │
#>                 ├─────────────────────────────────┼────────────┤
#>                 │ climate_aridity_index_average   │    844.765 │
#>                 ├─────────────────────────────────┼────────────┤
#>                 │ neighbors_count                 │    707.572 │
#>                 ├─────────────────────────────────┼────────────┤
#>                 │ neighbors_area                  │    649.625 │
#>                 ├─────────────────────────────────┼────────────┤
#>                 │ bias_species_per_record         │    607.005 │
#>                 ├─────────────────────────────────┼────────────┤
#>                 │ topography_elevation_average    │    523.113 │
#>                 ├─────────────────────────────────┼────────────┤
#>                 │ fragmentation_cohesion          │    484.973 │
#>                 ├─────────────────────────────────┼────────────┤
#>                 │ climate_velocity_lgm_average    │    218.293 │
#>                 ├─────────────────────────────────┼────────────┤
#>                 │ climate_bio15_minimum           │    215.974 │
#>                 ├─────────────────────────────────┼────────────┤
#>                 │ fragmentation_division          │    197.148 │
#>                 ├─────────────────────────────────┼────────────┤
#>                 │ neighbors_percent_shared_edge   │     92.874 │
#>                 ├─────────────────────────────────┼────────────┤
#>                 │ landcover_herbs_percent_average │    -81.849 │
#>                 └─────────────────────────────────┴────────────┘