Learn R Programming

finetune (version 1.0.1)

show_best.tune_race: Investigate best tuning parameters

Description

show_best() displays the top sub-models and their performance estimates.

Usage

# S3 method for tune_race
show_best(x, metric = NULL, n = 5, ...)

Arguments

x

The results of tune_grid() or tune_bayes().

metric

A character value for the metric that will be used to sort the models. (See https://yardstick.tidymodels.org/articles/metric-types.html for more details). Not required if a single metric exists in x. If there are multiple metric and none are given, the first in the metric set is used (and a warning is issued).

n

An integer for the maximum number of top results/rows to return.

...

For select_by_one_std_err() and select_by_pct_loss(), this argument is passed directly to dplyr::arrange() so that the user can sort the models from most simple to most complex. See the examples below. At least one term is required for these two functions.

Details

For racing results (from the finetune package), it is best to only report configurations that finished the race (i.e., were completely resampled). Comparing performance metrics for configurations averaged with different resamples is likely to lead to inappropriate results.