Skip to contents

This class is used to create visualizations of optimization traces.

Super class

vistool::Visualizer1D -> Visualizer1DObjective

Public fields

objective

(`Objective`)
The objective which was optimized. This object is used to generate the surface/contour lines.

Methods

Inherited methods


Method new()

Creates a new instance of this [R6][R6::R6Class] class.

Usage

Visualizer1DObjective$new(
  objective,
  x1_limits = NULL,
  padding = 0,
  n_points = 100L
)

Arguments

objective

(`Objective`)
The objective which was optimized. This object is used to generate the surface/contour lines.

x1_limits

(`numeric(2)`)
The x1 limits.

padding

(`numeric(1)`)
A margin that is added to x1limits and x2limits. The x1 margin is calculated by `max(x1lmits) - min(x1limits) * padding`.

n_points

(`integer(1)`)
The number of generated point per dimension. Note that a grid of `npoints^2` values is generated and evaluated by `objective$eval(x)` to plot the surface.


Method add_optimization_trace()

Add optimization trace to the plot.

Usage

Visualizer1DObjective$add_optimization_trace(optimizer)

Arguments

optimizer

(`Optimizer`)
The optimizer to add to the plot.


Method clone()

The objects of this class are cloneable with this method.

Usage

Visualizer1DObjective$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.