plotBenchmarkValidation: Validate Benchmark plot

View source: R/plots.R

plotBenchmarkValidationR Documentation

Validate Benchmark plot

Description

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

Usage

plotBenchmarkValidation(groundtruth, data, names = NULL)

Arguments

groundtruth

a data frame created with loggedExperiment. This data set represents the groundruth, which means that the experiment was performed with the 'true' objective function.

data

a list of data frames created with loggedExperiment. Each data frame represents the result of an experiment with a different emulation of the ground-truth function.

names

a character vector. Each represents a name for the method corresponding to an element of the data list.

Value

a ggplot instance

Examples

## 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)


martinzaefferer/COBBS documentation built on July 19, 2023, 4:12 a.m.