Description Usage Arguments Value Author(s) References Examples
Generates the Ackley benchmark function. The Ackley function is a commonly used test problem for global optimization procedures.
1 | ackley(x)
|
x |
A matrix containing the values of the input variables. |
Vector of the same length as x
giving the values of the Ackley function.
Laura Villanova, Kate Smith-Miles and Rob J Hyndman
http://www-optima.amp.i.kyoto-u.ac.jp/member/student/hedar/Hedar_files/TestGO_files/Page295.htm
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | x1 <- seq(-2, 2, length = 50)
x2 <- x1
x <- expand.grid(x1, x2)
z <- matrix(ackley(x),nrow = length(x1))
nrz <- nrow(z)
ncz <- ncol(z)
jet.colors <- colorRampPalette( c("red", "yellow") )
nbcol <- 100
color <- jet.colors(nbcol)
zfacet <- z[-1, -1] + z[-1, -ncz] + z[-nrz, -1] + z[-nrz, -ncz]
facetcol <- cut(zfacet, nbcol)
persp(x1, x2, z, col = color[facetcol], theta = 0, phi = 10,
expand = 1, xlab = "x1", ylab = "x2", zlab = "f(x1, x2)",
ticktype = "detailed")
|
Loading required package: earth
Loading required package: plotmo
Loading required package: plotrix
Loading required package: TeachingDemos
Loading required package: clusterSim
Loading required package: cluster
Loading required package: MASS
This is package 'modeest' written by P. PONCET.
For a complete list of functions, use 'library(help = "modeest")' or 'help.start()'.
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE
3: .onUnload failed in unloadNamespace() for 'rgl', details:
call: fun(...)
error: object 'rgl_quit' not found
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.