Create control object for hyperparameter tuning with predefined design.
Source:R/TuneControlDesign.R
makeTuneControlDesign.Rd
Completely pre-specifiy a data.frame
of design points to be evaluated
during tuning. All kinds of parameter types can be handled.
Usage
makeTuneControlDesign(
same.resampling.instance = TRUE,
impute.val = NULL,
design = NULL,
tune.threshold = FALSE,
tune.threshold.args = list(),
log.fun = "default"
)
Arguments
- same.resampling.instance
(
logical(1)
)
Should the same resampling instance be used for all evaluations to reduce variance? Default isTRUE
.- impute.val
(numeric)
If something goes wrong during optimization (e.g. the learner crashes), this value is fed back to the tuner, so the tuning algorithm does not abort. Imputation is only active ifon.learner.error
is configured not to stop in configureMlr. It is not stored in the optimization path, an NA and a corresponding error message are logged instead. Note that this value is later multiplied by -1 for maximization measures internally, so you need to enter a larger positive value for maximization here as well. Default is the worst obtainable value of the performance measure you optimize for when you aggregate by mean value, orInf
instead. For multi-criteria optimization pass a vector of imputation values, one for each of your measures, in the same order as your measures.- design
(data.frame)
data.frame
containing the different parameter settings to be evaluated. The columns have to be named according to theParamSet
which will be used intune()
. Proper designs can be created with ParamHelpers::generateDesign for instance.- tune.threshold
(
logical(1)
)
Should the threshold be tuned for the measure at hand, after each hyperparameter evaluation, via tuneThreshold? Only works for classification if the predict type is “prob”. Default isFALSE
.- tune.threshold.args
(list)
Further arguments for threshold tuning that are passed down to tuneThreshold. Default is none.- log.fun
(
function
|character(1)
)
Function used for logging. If set to “default” (the default), the evaluated design points, the resulting performances, and the runtime will be reported. If set to “memory” the memory usage for each evaluation will also be displayed, withcharacter(1)
small increase in run time. Otherwisecharacter(1)
function with argumentslearner
,resampling
,measures
,par.set
,control
,opt.path
,dob
,x
,y
,remove.nas
,stage
andprev.stage
is expected. The default displays the performance measures, the time needed for evaluating, the currently used memory and the max memory ever used before (the latter two both taken from gc). See the implementation for details.
See also
Other tune:
TuneControl
,
getNestedTuneResultsOptPathDf()
,
getNestedTuneResultsX()
,
getResamplingIndices()
,
getTuneResult()
,
makeModelMultiplexerParamSet()
,
makeModelMultiplexer()
,
makeTuneControlCMAES()
,
makeTuneControlGenSA()
,
makeTuneControlGrid()
,
makeTuneControlIrace()
,
makeTuneControlMBO()
,
makeTuneControlRandom()
,
makeTuneWrapper()
,
tuneParams()
,
tuneThreshold()