tuneMboMbo | R Documentation |
This function tunes the SMBO hyperparameters by mlrMBO. The user can choose if the tuning is initialized with an initial design or not. You can either pass one instance or multiple instances of the same problem as a list. We recommend to tune the hyperparameters after a large amount of black-box function evaluations, as the tuning will fail if the user chooses an amount which is too low. During the hyperparameter optimization of EBO::tuneMboMbo(), the user is able to see in the console if the hyperparameters can be tuned successfully. If all hyperparameter sets return approximately the same median of the target variable, we recommend to continue the SMBO with the default hyperparameters.
tuneMboMbo( instance, psOpt, funcEvals, psTune, itersMboTune = 10, minimize = FALSE, repls = 10, ncpus = NA, seed = 1, designOpt = NULL, maxTime = NULL )
instance |
[ |
psOpt |
[ |
funcEvals |
[ |
psTune |
[ |
itersMboTune |
[ |
minimize |
[ |
repls |
[ |
ncpus |
[ |
seed |
[ |
designOpt |
[ |
maxTime |
[ |
A data.frame containing the best suited hyperparameter set.
## Not run: set.seed(1) data <- data.frame(a=runif(50,10,100),b=runif(50,40,750),d=runif(50,0,90)) data$ratio <- rowSums(data^2) data$ratio <- data$ratio/max(data$ratio) colnames(data) <- c("power","time","pressure","ratio") model = list(mlr::train(mlr::makeLearner("regr.randomForest"), mlr::makeRegrTask(data = data, target = "ratio"))) psOpt = ParamHelpers::makeParamSet( ParamHelpers::makeNumericParam("power", lower = 10, upper = 100), ParamHelpers::makeNumericParam("time", lower = 40, upper = 750), ParamHelpers::makeNumericParam("pressure", lower = 0, upper = 90) ) funcEvals = 10 psTune = ParamHelpers::makeParamSet( ParamHelpers::makeDiscreteParam("design", values = c("maximinLHS", "optimumLHS")), ParamHelpers::makeDiscreteParam("crit", values = c("makeMBOInfillCritEI", "makeMBOInfillCritAEI", "makeMBOInfillCritCB", "makeMBOInfillCritAdaCB")), ParamHelpers::makeDiscreteParam("surrogate", values = c("regr.randomForest", "regr.km")), ParamHelpers::makeDiscreteParam("covtype" ,values = c("gauss","matern5_2", "matern3_2","powexp"), requires = quote(surrogate == "regr.km")) ) itersMboTune = 2 minimize = FALSE repls = 2 resTune = tuneMboMbo(model, psOpt, funcEvals, psTune, itersMboTune, minimize, repls) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.