plt.2d.surf: Visualize a 2D emulator + stopping region

View source: R/mlOSP_utils.R

plt.2d.surfR Documentation

Visualize a 2D emulator + stopping region

Description

Two-dimensional raster+contour+point plot of an mlOSP emulator at a single time step.

Usage

plt.2d.surf(
  fit,
  x = seq(31, 43, len = 201),
  y = seq(31, 43, len = 201),
  show.var = FALSE,
  only.contour = FALSE,
  contour.col = "red",
  bases = NULL,
  strike = 0
)

Arguments

fit

a fitted emulator. can be any of the types supported by forward.sim.policy

x, y

locations to use for the predict() functions. Default is a 200x200 fine grid. Passed to expand.grid

show.var

if TRUE then plot posterior surrogate variance instead of surrogate mean [default = FALSE] This only works for km and het/homGP/homTP objects

only.contour

– just the zero-contour, no raster plot

contour.col

(default is "red") – color of the zero contour

bases

(only used for lm objects)

Details

Uses the raster plot from ggplot2. For GP-based objects, also shows the unique design sites via geom_point. See plt.2d.surf.batch for a similar plot for osp.seq.batch.design emulators.

Value

a ggplot handle for the created plot.


mludkov/mlOSP documentation built on April 29, 2023, 7:56 p.m.