plot | R Documentation |
This function draws validation plots of a GP, DGP, or linked (D)GP emulator.
## S3 method for class 'dgp'
plot(
x,
x_test = NULL,
y_test = NULL,
dim = NULL,
method = NULL,
sample_size = 50,
style = 1,
min_max = TRUE,
normalize = TRUE,
color = "turbo",
type = "points",
verb = TRUE,
M = 50,
force = FALSE,
cores = 1,
...
)
## S3 method for class 'lgp'
plot(
x,
x_test = NULL,
y_test = NULL,
dim = NULL,
method = NULL,
sample_size = 50,
style = 1,
min_max = TRUE,
color = "turbo",
type = "points",
M = 50,
verb = TRUE,
force = FALSE,
cores = 1,
...
)
## S3 method for class 'gp'
plot(
x,
x_test = NULL,
y_test = NULL,
dim = NULL,
method = NULL,
sample_size = 50,
style = 1,
min_max = TRUE,
color = "turbo",
type = "points",
verb = TRUE,
M = 50,
force = FALSE,
cores = 1,
...
)
See further examples and tutorials at https://mingdeyu.github.io/dgpsi-R/.
A patchwork
object.
plot()
calls validate()
internally to obtain validation results for plotting. However, plot()
will not export the
emulator object with validation results. Instead, it only returns the plotting object. For small-scale validations (i.e., small
training or testing data points), direct execution of plot()
works well. However, for moderate- to large-scale validation,
it is recommended to first run validate()
to obtain and store validation results in the emulator object, and then supply the
object to plot()
. plot()
checks the object's loo
and oos
slots prior to calling validate()
and will not perform further calculation if the required information is already stored.
plot()
will only use stored OOS validation if x_test
and y_test
are identical to those used by validate()
to produce the data contained in the object's oos
slot, otherwise plot()
will re-evaluate OOS validation before plotting.
The returned patchwork::patchwork object contains the ggplot2::ggplot2 objects. One can modify the included individual ggplots by accessing them with double-bracket indexing. See https://patchwork.data-imaginist.com/ for further information.
## Not run:
# See gp(), dgp(), or lgp() for an example.
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.