- object
A parsnip
model specification or a workflows::workflow()
.
- ...
Not currently used.
The technical details of this method are described in Kuhn (2014).
Racing methods are efficient approaches to grid search. Initially, the
function evaluates all tuning parameters on a small initial set of
resamples. The burn_in
argument of control_race()
sets the number of
initial resamples.
The performance statistics from the current set of resamples are converted
to win/loss/tie results. For example, for two parameters (j
and k
) in a
classification model that have each been resampled three times:
| area under the ROC curve |
-----------------------------
resample | parameter j | parameter k | winner
---------------------------------------------
1 | 0.81 | 0.92 | k
2 | 0.95 | 0.94 | j
3 | 0.79 | 0.81 | k
---------------------------------------------
After the third resample, parameter k
has a 2:1 win/loss ratio versus j
.
Parameters with equal results are treated as a half-win for each setting.
These statistics are determined for all pairwise combinations of the
parameters and a Bradley-Terry model is used to model these win/loss/tie
statistics. This model can compute the ability of a parameter combination to
win overall. A confidence interval for the winning ability is computed and
any settings whose interval includes zero are retained for future resamples
(since it is not statistically different form the best results).
The next resample is used with the remaining parameter combinations and the
statistical analysis is updated. More candidate parameters may be excluded
with each new resample that is processed.
The control_race()
function contains are parameter for the significance cutoff
applied to the Bradley-Terry model results as well as other relevant arguments.
- preprocessor
A traditional model formula or a recipe created using
recipes::recipe()
.
- resamples
An rset()
object that has multiple resamples (i.e., is not
a validation set).
- param_info
A dials::parameters()
object or NULL
. If none is given,
a parameters set is derived from other arguments. Passing this argument can
be useful when parameter ranges need to be customized.
- grid
A data frame of tuning combinations or a positive integer. The
data frame should have columns for each parameter being tuned and rows for
tuning parameter candidates. An integer denotes the number of candidate
parameter sets to be created automatically.
- metrics
A yardstick::metric_set()
or NULL
.
- control
An object used to modify the tuning process.