plotBenchmarkPerformance: Performance plot

View source: R/plots.R

plotBenchmarkPerformanceR Documentation

Performance plot

Description

Create a simple performance plot, showing the scaled performance of an algorithm over time (based on experiments with different objective functions).

Usage

plotBenchmarkPerformance(data, names = NULL)

Arguments

data

a list of data frames created with loggedExperiment. Each data frame represents the result of an experiment with a different objective function.

names

a character vector. Each represents a name for the underlying objective function of the data list.

Value

a ggplot instance

Examples

## create data by running optim L-BFGS-B with two objective functions
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)x^2, 1:10)
res2 <- loggedExperiment(expr, function(x)sqrt(abs(x)), 1:10)
## create the plot from the results
p <- plotBenchmarkPerformance(list(res1,res2),names=c("square","root"))
print(p)


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