R/generateHyperControl.R
generateHyperControl.Rd
Tries to automatically create a suitable hyperparameter tuning control.
generateHyperControl( task, par.config = NULL, learner = NULL, budget.evals = 250 )
task | [ |
---|---|
par.config | [ |
learner | [ |
budget.evals | [ |
[HyperControl
]
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) #>getHyperControlMlrControl(hyper.control)#> Tune control: TuneControlMBO #> Same resampling instance: TRUE #> Imputation value: <worst> #> Start: <NULL> #> #> Tune threshold: FALSE #> Further arguments:getHyperControlResampling(hyper.control)#> 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 result: #> Op. pars: nodesize=4; mtry=6 #> medse.test.mean=2.5121071