plot {dgpsi} | R Documentation |
Validation plots of a constructed GP, DGP, or linked (D)GP emulator
Description
This function draws validation plots of a GP, DGP, or linked (D)GP emulator.
Usage
## 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,
...
)
Arguments
x |
can be one of the following emulator classes:
|
x_test |
same as that of |
y_test |
same as that of |
dim |
This argument is only used when |
method |
same as that of |
sample_size |
same as that of |
style |
either |
min_max |
a bool indicating if min-max normalization will be used to scale the testing output, RMSE, predictive mean and std from the
emulator. Defaults to |
normalize |
|
color |
a character string indicating the color map to use when
Defaults to |
type |
either |
verb |
a bool indicating if trace information on plotting will be printed during execution.
Defaults to |
M |
|
force |
same as that of |
cores |
same as that of |
... |
N/A. |
Details
See further examples and tutorials at https://mingdeyu.github.io/dgpsi-R/.
Value
A patchwork
object.
Note
-
plot()
callsvalidate()
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 ofplot()
works well. However, for moderate- to large-scale validation, it is recommended to first runvalidate()
to obtain and store validation results in the emulator object, and then supply the object toplot()
.plot()
checks the object'sloo
andoos
slots prior to callingvalidate()
and will not perform further calculation if the required information is already stored. -
plot()
will only use stored OOS validation ifx_test
andy_test
are identical to those used byvalidate()
to produce the data contained in the object'soos
slot, otherwiseplot()
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.
Examples
## Not run:
# See gp(), dgp(), or lgp() for an example.
## End(Not run)