Learn R Programming

CEGO (version 2.1.0)

optimCEGO: Combinatorial Efficient Global Optimization

Description

Model-based optimization for combinatorial or mixed problems. Based on measures of distance or dissimilarity.

Usage

optimCEGO(x = NULL, fun, control = list())

Arguments

x

Optional initial design as a list. If NULL (default), creationFunction (in control list) is used to create initial design. If x has less individuals than specified by control$evalInit, creationFunction will fill up the design.

fun

target function to be minimized

control

(list), with the options of optimization and model building approaches employed evalInit Number of initial evaluations (i.e., size of the initial design), integer, default is 2 vectorized Boolean. Defines whether target function is vectorized (takes a list of solutions as argument) or not (takes single solution as argument). Default: FALSE verbosity Level of text output during run. Defaults to 0, no output. plotting Plot optimization progress during run (TRUE) or not (FALSE). Default is FALSE. targetY optimal value to be found, stopping criterion, default is -Inf evalBudget maximum number of target function evaluations, default is 100 creationRetries When a model does not predict an actually improving solution, a random exploration step is performed. creationRetries solutions are created randomly. For each, distance to all known solutions is calculated. The minimum distance is recorded for each random solution. The random solution with maximal minimum distance is chosen doe be evaluated in the next iteration. model Model to be used as a surrogate of the target function. Default is "K" (Kriging). Also available are: "LM" (linear, distance-based model), "RBFN" Radial Basis Function Network. modelSettings List of settings for model building, passed on as the control argument to the model training functions modelKriging, modelLinear, modelRBFN. infill This parameter specifies a function to be used for the infill criterion (e.g., the default is expected improvement infillExpectedImprovement). To use no specific infill criterion this has to be set to NA. Infill criteria are only used with models that may provide some error estimate with predictions. optimizer Optimizer that finds the minimum of the surrogate model. Default is optimEA, an Evolutionary Algorithm. optimizerSettings List of settings (control) for the optimizer function. initialDesign Design function that generates the initial design. Default is designMaxMinDist, which creates a design that maximizes the minimum distance between points. initialDesignSettings List of settings (control) for the initialDesign function. creationFunction Function to create individuals/solutions in search space. Default is a function that creates random permutations of length 6 distanceFunction distanceFunction a suitable distance function of type f(x1,x2), returning a scalar distance value, preferably between 0 and 1. Maximum distances larger 1 are not a problem, but may yield scaling bias when different measures are compared. Should be non-negative and symmetric. With the setting control$model="K" this can also be a list of different fitness functions. Default is Hamming distance for permutations: distancePermutationHamming.

Value

a list: xbest best solution found ybest fitness of the best solution x history of all evaluated solutions y corresponding target function values f(x) fit model-fit created in the last iteration fpred prediction function created in the last iteration count number of performed target function evaluations message message string, giving information on termination reason convergence error/status code: -1 for termination due to failed model building, 0 for termination due to depleted budget, 1 if attained objective value is equal to or below target (control$targetY)

References

Zaefferer, Martin; Stork, Joerg; Friese, Martina; Fischbach, Andreas; Naujoks, Boris; Bartz-Beielstein, Thomas. (2014). Efficient global optimization for combinatorial problems. In Proceedings of the 2014 conference on Genetic and evolutionary computation (GECCO '14). ACM, New York, NY, USA, 871-878. DOI=10.1145/2576768.2598282 http://doi.acm.org/10.1145/2576768.2598282

Zaefferer, Martin; Stork, Joerg; Bartz-Beielstein, Thomas. (2014). Distance Measures for Permutations in Combinatorial Efficient Global Optimization. In Parallel Problem Solving from Nature - PPSN XIII (p. 373-383). Springer International Publishing.

See Also

modelKriging, modelLinear, modelRBFN, buildModel, optimEA

Examples

Run this code
# NOT RUN {
seed <- 0
#distance
dF <- distancePermutationHamming
#mutation
mF <- mutationPermutationSwap
#recombination
rF <-  recombinationPermutationCycleCrossover 
#creation
cF <- function()sample(5)
#objective function
lF <- landscapeGeneratorUNI(1:5,dF)
#start optimization
set.seed(seed)
res1 <- optimCEGO(,lF,list(
			creationFunction=cF,
			distanceFunction=dF,
			optimizerSettings=list(budget=100,popsize=10,
			mutationFunction=mF,recombinationFunction=rF),
	evalInit=5,budget=15,targetY=0,verbosity=1,model=modelKriging,
	vectorized=TRUE)) ##target function is "vectorized", expects list as input
set.seed(seed)
res2 <- optimCEGO(,lF,list(
			creationFunction=cF,
			distanceFunction=dF,
			optimizerSettings=list(budget=100,popsize=10,
			mutationFunction=mF,recombinationFunction=rF),
			evalInit=5,budget=15,targetY=0,verbosity=1,model=modelRBFN,
	vectorized=TRUE)) ##target function is "vectorized", expects list as input
res1$xbest 
res2$xbest 

# }

Run the code above in your browser using DataLab