noisyCE2 {noisyCE2} | R Documentation |
Cross-Entropy Optimisation of Noisy Functions
Description
Unconstraint optimisation of noisy functions through the cross-entropy algorithm.
Usage
noisyCE2(
f,
domain,
...,
rho = 0.05,
N = 1000,
smooth = NULL,
stopwindow = tail(gam, (n > 20) * n/2),
stoprule = ts_change(x),
maxiter = 1000,
maximise = TRUE,
verbose = "v"
)
## S3 method for class 'noisyCE2'
print(x, ...)
## S3 method for class 'noisyCE2'
summary(object, ...)
## S3 method for class 'noisyCE2'
plot(x, what = c("x", "gam", "param"), start = NULL, end = NULL, ...)
## S3 method for class 'noisyCE2'
coef(object, ...)
Arguments
f |
objective function which takes the vector of optimisation variables as first argument. |
domain |
a |
... |
other arguments to be passed to |
rho |
parameter |
N |
parameter |
smooth |
list of unevaluated expressions to be used as smoothing rules
for the parameters of the sampling probability distributions of all
variables. If not |
stopwindow |
unevaluated expression returning the object to be passed to
the stopping rule. Symbol |
stoprule |
stopping rule passed as an unevaluated expression including
|
maxiter |
maximum number of iteration. When it is reached, algorithm is
stopped whether or not the stopping criterion is satisfied. If the maximum
number of iteration is reached, the |
maximise |
if |
verbose |
algorithm verbosity (values |
x , object |
object of class |
what |
type of plot should be drawn. If |
start , end |
first and last value to be plotted. If |
Value
An object of class noisyCE2
structured as a list with the following
components:
f |
argument |
fobj |
objective function |
xopt |
|
hxopt |
matrix of |
param |
|
gam |
vector of values |
niter |
number of iterations. |
code |
convergence code of the algorithm. Value |
convMess |
textual message associated to the convergence code (if any). |
compTimes |
named vector computation times of each phase. |
Methods (by generic)
-
print
: display synthetic information about anoisyCE2
object -
summary
: display summary information about anoisyCE2
object -
plot
: plot various components of anoisyCE2
object -
coef
: get the solution of the optimisation
Examples
library(magrittr)
# Optimisation of the 4-dimensional function:
# f(x1,x2,x3,x4)=-(x1-1)^2-(x2-2)^2-(x3-3)^2-(x4-4)^2
sol <- noisyCE2(function(x) -sum((x - (1:4))^2), domain = rep('real', 4))
# Representation of the convergence process:
plot(sol, what = 'x')
plot(sol, what = 'gam')