View source: R/parameter_optimization.R
mlrmbo_optimization | R Documentation |
mlrmbo_optimization
will execute multi-objective model-based optimization of an objective function. The defined surrogate learner here is "kriging".
mlrmbo_optimization(run_id,obj_fun,niter,ncores,nstart,additional_arguments)
run_id |
Indicate the id of the optimization run. |
obj_fun |
An objective function as created by the function |
niter |
The number of iterations during the optimization process. |
ncores |
The number of cores on which several parameter settings will be evaluated in parallel. |
nstart |
The number of different parameter settings used in the begin design. |
additional_arguments |
A list of named additional arguments that will be passed on the objective function. |
A result object from the function mlrMBO::mbo
. Among other things, this contains the optimal parameter settings, the output corresponding to every input etc.
## Not run:
library(dplyr)
library(mlrMBO)
library(parallelMap)
additional_arguments_topology_correction = list(source_names = source_weights_df$source %>% unique(), algorithm = "PPR", correct_topology = TRUE,lr_network = lr_network, sig_network = sig_network, gr_network = gr_network, settings = lapply(expression_settings_validation,convert_expression_settings_evaluation), secondary_targets = FALSE, remove_direct_links = "no", cutoff_method = "quantile")
nr_datasources = additional_arguments_topology_correction$source_names %>% length()
obj_fun_multi_topology_correction = makeMultiObjectiveFunction(name = "nichenet_optimization",description = "data source weight and hyperparameter optimization: expensive black-box function", fn = model_evaluation_optimization, par.set = makeParamSet( makeNumericVectorParam("source_weights", len = nr_datasources, lower = 0, upper = 1), makeNumericVectorParam("lr_sig_hub", len = 1, lower = 0, upper = 1), makeNumericVectorParam("gr_hub", len = 1, lower = 0, upper = 1), makeNumericVectorParam("damping_factor", len = 1, lower = 0, upper = 0.99)), has.simple.signature = FALSE,n.objectives = 4, noisy = FALSE,minimize = c(FALSE,FALSE,FALSE,FALSE))
mlrmbo_optimization = lapply(1,mlrmbo_optimization, obj_fun = obj_fun_multi_topology_correction, niter = 3, ncores = 8, nstart = 100, additional_arguments = additional_arguments_topology_correction)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.