Subclass for generalized simulated annealing tuning calling GenSA::GenSA() from package GenSA.

Source

Tsallis C, Stariolo DA (1996). “Generalized simulated annealing.” Physica A: Statistical Mechanics and its Applications, 233(1-2), 395--406. doi: 10.1016/s0378-4371(96)00271-3 .

Xiang Y, Gubian S, Suomela B, Hoeng J (2013). “Generalized Simulated Annealing for Global Optimization: The GenSA Package.” The R Journal, 5(1), 13. doi: 10.32614/rj-2013-002 .

Dictionary

This Tuner can be instantiated via the dictionary mlr_tuners or with the associated sugar function tnr():

mlr_tuners$get("gensa")
tnr("gensa")

Logging

All Tuners use a logger (as implemented in lgr) from package bbotk. Use lgr::get_logger("bbotk") to access and control the logger.

Parameters

smooth

logical(1)

temperature

numeric(1)

acceptance.param

numeric(1)

verbose

logical(1)

trace.mat

logical(1)

For the meaning of the control parameters, see GenSA::GenSA(). Note that we have removed all control parameters which refer to the termination of the algorithm and where our terminators allow to obtain the same behavior.

Super classes

mlr3tuning::Tuner -> mlr3tuning::TunerFromOptimizer -> TunerGenSA

Methods

Public methods

Inherited methods

Method new()

Creates a new instance of this R6 class.

Usage

TunerGenSA$new()


Method clone()

The objects of this class are cloneable with this method.

Usage

TunerGenSA$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

library(mlr3) library(paradox) search_space = ParamSet$new(list( ParamDbl$new("cp", lower = 0.001, upper = 0.1) )) terminator = trm("evals", n_evals = 3) instance = TuningInstanceSingleCrit$new( task = tsk("iris"), learner = lrn("classif.rpart"), resampling = rsmp("holdout"), measure = msr("classif.ce"), search_space = search_space, terminator = terminator ) tt = tnr("gensa") # modifies the instance by reference tt$optimize(instance)
#> cp learner_param_vals x_domain classif.ce #> 1: 0.05788167 <list[2]> <list[1]> 0.04
# returns best configuration and best performance instance$result
#> cp learner_param_vals x_domain classif.ce #> 1: 0.05788167 <list[2]> <list[1]> 0.04
# allows access of data.table of full path of all evaluations instance$archive
#> <ArchiveTuning> #> cp classif.ce uhash x_domain #> 1: 0.05788167 0.04 58cc4cd5-60c3-4d2f-bbb7-102fb348bcab <list[1]> #> 2: 0.02234443 0.04 9efe509f-37f2-4e30-ad66-76510f60fbb5 <list[1]> #> 3: 0.03735377 0.04 13bcb32e-21d9-4183-8e27-7e56efab54db <list[1]> #> timestamp batch_nr #> 1: 2020-09-28 04:30:42 1 #> 2: 2020-09-28 04:30:42 2 #> 3: 2020-09-28 04:30:42 3