Obtain and format results produced by tuning functions for ensemble objects
Source:R/collect_metrics.R
collect_metrics.simple_ensemble.Rd
Return a tibble of performance metrics for all models.
Usage
# S3 method for class 'simple_ensemble'
collect_metrics(x, ...)
# S3 method for class 'repeat_ensemble'
collect_metrics(x, ...)
Arguments
- x
A
simple_ensemble
orrepeat_ensemble
object- ...
Not currently used.
Details
When applied to a ensemble, the metrics that are returned do not contain the actual tuning parameter columns and values (unlike when these collect functions are run on other objects). The reason is that ensembles contain different types of models or models with different tuning parameters.
Examples
collect_metrics(lacerta_ensemble)
#> # A tibble: 12 × 5
#> wflow_id .metric mean std_err n
#> <chr> <chr> <dbl> <dbl> <int>
#> 1 default_glm boyce_cont 0.683 0.0573 3
#> 2 default_glm roc_auc 0.789 0.0137 3
#> 3 default_glm tss_max 0.533 0.0192 3
#> 4 default_rf boyce_cont 0.632 0.0552 3
#> 5 default_rf roc_auc 0.791 0.0146 3
#> 6 default_rf tss_max 0.519 0.0284 3
#> 7 default_gbm boyce_cont 0.738 0.0473 3
#> 8 default_gbm roc_auc 0.792 0.00304 3
#> 9 default_gbm tss_max 0.545 0.0368 3
#> 10 default_maxent boyce_cont 0.832 0.0771 3
#> 11 default_maxent roc_auc 0.832 0.00649 3
#> 12 default_maxent tss_max 0.595 0.0124 3
collect_metrics(lacerta_rep_ens)
#> # A tibble: 18 × 6
#> rep_id wflow_id .metric mean std_err n
#> <chr> <chr> <chr> <dbl> <dbl> <int>
#> 1 rep_01 default_glm boyce_cont 0.796 0.0241 5
#> 2 rep_01 default_glm roc_auc 0.974 0.00385 5
#> 3 rep_01 default_glm tss_max 0.881 0.0155 5
#> 4 rep_01 default_maxent boyce_cont 0.834 0.0603 5
#> 5 rep_01 default_maxent roc_auc 0.981 0.0129 5
#> 6 rep_01 default_maxent tss_max 0.914 0.0345 5
#> 7 rep_02 default_glm boyce_cont 0.716 0.0520 5
#> 8 rep_02 default_glm roc_auc 0.940 0.0268 5
#> 9 rep_02 default_glm tss_max 0.813 0.0543 5
#> 10 rep_02 default_maxent boyce_cont 0.808 0.0745 5
#> 11 rep_02 default_maxent roc_auc 0.982 0.00807 5
#> 12 rep_02 default_maxent tss_max 0.883 0.0270 5
#> 13 rep_03 default_glm boyce_cont 0.402 0.179 5
#> 14 rep_03 default_glm roc_auc 0.940 0.0202 5
#> 15 rep_03 default_glm tss_max 0.821 0.0330 5
#> 16 rep_03 default_maxent boyce_cont 0.908 0.0312 5
#> 17 rep_03 default_maxent roc_auc 0.976 0.00727 5
#> 18 rep_03 default_maxent tss_max 0.854 0.0345 5