Configure validation data for the learner that is tuned by the AutoTuner
.
Usage
# S3 method for class 'AutoTuner'
set_validate(learner, validate, ...)
Arguments
- learner
(
AutoTuner
)
The autotuner for which to enable validation.- validate
(
numeric(1)
,"predefined"
,"test"
, orNULL
)
How to configure the validation during the hyperparameter tuning.- ...
(any)
Passed when callingset_validate()
on the wrapped leaerner.
Examples
at = auto_tuner(
tuner = tnr("random_search"),
learner = lrn("classif.debug", early_stopping = TRUE,
iter = to_tune(upper = 1000L, internal = TRUE), validate = 0.2),
resampling = rsmp("holdout")
)
# use the test set as validation data during tuning
set_validate(at, validate = "test")
at$learner$validate
#> [1] "test"