plot2d: Visualize optimization procedure in 2d contour plot

Description Usage Arguments

View source: R/plot.2d.R

Description

This functions visualizes the steps of the optimization in a 2 dimensional contour plot. The default upper and lower bounds for the plot are set by the box constraints of the respective optimization function.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
plot2d(
  f,
  x1.lower,
  x1.upper,
  x2.lower,
  x2.upper,
  n.x = 30L,
  xmat,
  trueOpt = NULL,
  algoName = NULL,
  plotSegments = FALSE,
  optimError = FALSE
)

Arguments

f

a (multi-) dimensional function to be eptimized.

x1.lower

the lower boundary for the range of the x1 coordinate displayed.

x1.upper

the upper boundary for the range of the x1 coordinate displayed.

x2.lower

the lower boundary for the range of the x2 coordinate displayed.

x2.upper

the upper boundary for the range of the x2 coordinate displayed.

n.x

the number (equidistant) points at which f is evaluated w.r.t x1 and x2 coordinate.

xmat

an object of class list containing the results of the algorithm.

trueOpt

is a numeric vector of the true optimum of the function.

optimError

passed argument from optimization. Specifies if error in gradient occured.

algoNamw

list of strings with names of algorithms. Length must equal length of 'xmat'.


PhilippScheller/visualDescend documentation built on Feb. 5, 2020, 4:04 a.m.