library(TheSource)
cost = function(x) { x^2 } b = data.frame(min = -10, max = 10) m = parameter.search(n = 1, cost = cost, bounds = b) str(m)
plot(m$grid$x, m$grid$cost) abline(v = m$min$x)
cost = function(x) { x^2 } b = data.frame(min = -10, max = 10) m = parameter.search(n = 10, cost = cost, bounds = b, progression = 1) par(mfrow=c(1,2)) plot(m$history$x, m$history$cost, xlim = c(-10,10), main = m$min$x) plot(m$history$x, m$history$cost) abline(v = m$min$x)
cost = test.function(1) m = parameter.search(n = 10, cost = cost, bounds = b, progression = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.