plotBenchmarkValidation | R Documentation |
This plot is entended to plot the error (over runtime) for an benchmark function used to test optimization algorithms. For details on usage, please see the example
plotBenchmarkValidation(groundtruth, data, names = NULL)
groundtruth |
a data frame created with |
data |
a list of data frames created with |
names |
a character vector. Each represents a name for the method corresponding to an element of the |
a ggplot instance
## generate some example data, with groundtruth sqrt(|x|), and emulations x^2, log(|x|+0.1).
lower <- -1
upper <- 1
require(nloptr)
expr <- expression(
res <- lbfgs(x0=runif(1,lower,upper),fn = fnlog,
lower=lower,upper=upper)
)
res1 <- loggedExperiment(expr, function(x)sqrt(abs(x)), 1:10)
res2 <- loggedExperiment(expr, function(x)x^2, 1:10)
res3 <- loggedExperiment(expr, function(x)log(abs(x)+0.1), 1:10)
## plot
p <- plotBenchmarkValidation(res1,list(res2,res3),names=c("square","log"))
print(p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.