Tries to automatically create a suitable hyperparameter tuning control.

generateHyperControl(
  task,
  par.config = NULL,
  learner = NULL,
  budget.evals = 250
)

Arguments

task

[Task] The Task

par.config

[ParConfig] The Parameter Configuration

learner

[Learner] Learner

budget.evals

[integer] How many train-test iterations do you want to allow?

Value

[HyperControl]

Examples

par.config = getDefaultParConfig("regr.randomForest") hyper.control = generateHyperControl(bh.task, par.config) # get what is inside getHyperControlMeasures(hyper.control)
#> [[1]] #> Name: Mean of squared errors #> Performance measure: mse #> Properties: regr,req.pred,req.truth #> Minimize: TRUE #> Best: 0; Worst: Inf #> Aggregated by: test.mean #> Arguments: #> Note: Defined as: mean((response - truth)^2) #>
#> Tune control: TuneControlMBO #> Same resampling instance: TRUE #> Imputation value: <worst> #> Start: <NULL> #> #> Tune threshold: FALSE #> Further arguments:
#> Resample description: cross-validation with 10 iterations. #> Predict: test #> Stratification: FALSE
# change what is inside hyper.control = setHyperControlMeasures(hyper.control, measures = medse) hyper.control = setHyperControlMlrControl( hyper.control, mlr.control = makeTuneControlRandom(maxit = 10)) hyper.control = setHyperControlResampling(hyper.control, resampling = cv3) hyperopt(task = bh.task, par.config = par.config, hyper.control = hyper.control)
#> [Tune] Started tuning learner regr.randomForest for parameter set:
#> Type len Def Constr Req Tunable Trafo #> nodesize integer - 1 1 to 10 - TRUE - #> mtry integer - 4 1 to 13 - TRUE -
#> With control class: TuneControlRandom
#> Imputation value: Inf
#> [Tune-x] 1: nodesize=5; mtry=10
#> [Tune-y] 1: medse.test.mean=2.6536466; time: 0.0 min
#> [Tune-x] 2: nodesize=5; mtry=11
#> [Tune-y] 2: medse.test.mean=2.5917132; time: 0.0 min
#> [Tune-x] 3: nodesize=1; mtry=8
#> [Tune-y] 3: medse.test.mean=2.5762609; time: 0.0 min
#> [Tune-x] 4: nodesize=10; mtry=2
#> [Tune-y] 4: medse.test.mean=3.0611292; time: 0.0 min
#> [Tune-x] 5: nodesize=8; mtry=2
#> [Tune-y] 5: medse.test.mean=3.0070662; time: 0.0 min
#> [Tune-x] 6: nodesize=9; mtry=4
#> [Tune-y] 6: medse.test.mean=2.6248005; time: 0.0 min
#> [Tune-x] 7: nodesize=4; mtry=4
#> [Tune-y] 7: medse.test.mean=2.5734068; time: 0.0 min
#> [Tune-x] 8: nodesize=4; mtry=6
#> [Tune-y] 8: medse.test.mean=2.5121071; time: 0.0 min
#> [Tune-x] 9: nodesize=7; mtry=13
#> [Tune-y] 9: medse.test.mean=2.7329064; time: 0.0 min
#> [Tune-x] 10: nodesize=5; mtry=2
#> [Tune-y] 10: medse.test.mean=2.7246530; time: 0.0 min
#> [Tune] Result: nodesize=4; mtry=6 : medse.test.mean=2.5121071
#> Tune result: #> Op. pars: nodesize=4; mtry=6 #> medse.test.mean=2.5121071