Skip to contents

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 or repeat_ensemble object

...

Not currently used.

Value

A tibble.

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.661 0.192       3
#>  2 default_glm    roc_auc    0.779 0.0149      3
#>  3 default_glm    tss_max    0.494 0.0612      3
#>  4 default_rf     boyce_cont 0.637 0.0367      3
#>  5 default_rf     roc_auc    0.773 0.0180      3
#>  6 default_rf     tss_max    0.497 0.0118      3
#>  7 default_gbm    boyce_cont 0.550 0.188       3
#>  8 default_gbm    roc_auc    0.776 0.0107      3
#>  9 default_gbm    tss_max    0.514 0.0202      3
#> 10 default_maxent boyce_cont 0.622 0.0412      3
#> 11 default_maxent roc_auc    0.809 0.00822     3
#> 12 default_maxent tss_max    0.572 0.00390     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